mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add cast to remove warning; close #154
This commit is contained in:
+2
-2
@@ -1481,7 +1481,7 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
char buf[4];
|
||||
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));
|
||||
genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym));
|
||||
push();
|
||||
@@ -1493,7 +1493,7 @@ codegen(codegen_scope *s, node *tree, int val)
|
||||
char buf[4];
|
||||
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));
|
||||
genop(s, MKOP_ABx(OP_GETGLOBAL, cursp(), sym));
|
||||
push();
|
||||
|
||||
+2
-2
@@ -5238,11 +5238,11 @@ parser_dump(mrb_state *mrb, node *tree, int offset)
|
||||
break;
|
||||
|
||||
case NODE_BACK_REF:
|
||||
printf("NODE_BACK_REF: $%c\n", (int)tree);
|
||||
printf("NODE_BACK_REF: $%c\n", (int)(intptr_t)tree);
|
||||
break;
|
||||
|
||||
case NODE_NTH_REF:
|
||||
printf("NODE_NTH_REF: $%d\n", (int)tree);
|
||||
printf("NODE_NTH_REF: $%d\n", (int)(intptr_t)tree);
|
||||
break;
|
||||
|
||||
case NODE_ARG:
|
||||
|
||||
Reference in New Issue
Block a user