Commit 490fa452 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

add cast to remove warning; close #154

parent d65542cc
...@@ -1481,7 +1481,7 @@ codegen(codegen_scope *s, node *tree, int val) ...@@ -1481,7 +1481,7 @@ codegen(codegen_scope *s, node *tree, int val)
char buf[4]; char buf[4];
int sym; int sym;
snprintf(buf, 3, "$%c", (intptr_t)tree); snprintf(buf, 3, "$%c", (int)(intptr_t)tree);
sym = new_sym(s, mrb_intern(s->mrb, buf)); sym = new_sym(s, mrb_intern(s->mrb, buf));
genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym)); genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym));
push(); push();
...@@ -1493,7 +1493,7 @@ codegen(codegen_scope *s, node *tree, int val) ...@@ -1493,7 +1493,7 @@ codegen(codegen_scope *s, node *tree, int val)
char buf[4]; char buf[4];
int sym; int sym;
snprintf(buf, 3, "$%d", (intptr_t)tree); snprintf(buf, 3, "$%d", (int)(intptr_t)tree);
sym = new_sym(s, mrb_intern(s->mrb, buf)); sym = new_sym(s, mrb_intern(s->mrb, buf));
genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym)); genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym));
push(); push();
......
...@@ -5238,11 +5238,11 @@ parser_dump(mrb_state *mrb, node *tree, int offset) ...@@ -5238,11 +5238,11 @@ parser_dump(mrb_state *mrb, node *tree, int offset)
break; break;
case NODE_BACK_REF: case NODE_BACK_REF:
printf("NODE_BACK_REF: $%c\n", (int)tree); printf("NODE_BACK_REF: $%c\n", (int)(intptr_t)tree);
break; break;
case NODE_NTH_REF: case NODE_NTH_REF:
printf("NODE_NTH_REF: $%d\n", (int)tree); printf("NODE_NTH_REF: $%d\n", (int)(intptr_t)tree);
break; break;
case NODE_ARG: case NODE_ARG:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment