summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 07:52:47 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 07:52:47 +0000
commit72a943aa47b922f8bd2b4348e85928fdf675fa5b (patch)
tree4c3ae9931ceb608db74e50fe1a62e7944884a710 /parse.y
parent708122f30a83f487c2a8c95eaef4ee999af50720 (diff)
merge revision(s) 16507:
* 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_6@17646 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 bde7c7d..0dde920 100644
--- a/parse.y
+++ b/parse.y
@@ -6130,6 +6130,7 @@ rb_id2name(id)
ID id;
{
char *name;
+ st_data_t data;
if (id < tLAST_TOKEN) {
int i;
@@ -6140,8 +6141,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;
@@ -6354,7 +6355,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);