summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-21 14:29:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-21 14:29:55 +0000
commit722ad8f2144bd20459a3858e2cb8c0e5b3559c8a (patch)
treea172dc873b49dc468a4709afd1c0f28dd56b1b0c /parse.y
parent87b59f48f646082f23151114d8b99f61ef76cf01 (diff)
* eval.c (search_method, remove_method, error_print, rb_alias)
(rb_eval, rb_rescue2, search_required, Init_eval, rb_thread_create), gc.c (rb_source_filename, Init_stack), io.c (rb_io_getline), parse.y (rb_id2name, rb_parser_free): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 06b02f566c..f843f6584a 100644
--- a/parse.y
+++ b/parse.y
@@ -6197,6 +6197,7 @@ rb_id2name(id)
ID id;
{
char *name;
+ st_data_t data;
if (id < tLAST_TOKEN) {
int i;
@@ -6207,8 +6208,8 @@ rb_id2name(id)
}
}
- if (st_lookup(sym_rev_tbl, id, (st_data_t *)&name))
- return name;
+ if (st_lookup(sym_rev_tbl, id, &data))
+ return (char *)data;
if (is_attrset_id(id)) {
ID id2 = (id & ~ID_SCOPE_MASK) | ID_LOCAL;
@@ -6421,7 +6422,7 @@ rb_parser_free(ptr)
{
NODE **prev = &parser_heap, *n;
- while (n = *prev) {
+ while ((n = *prev) != 0) {
if (n->u1.node == ptr) {
*prev = n->u2.node;
rb_gc_force_recycle((VALUE)n);