summaryrefslogtreecommitdiffhomepage
path: root/src/codegen.c
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-05-17 16:38:37 +0900
committerYukihiro Matsumoto <[email protected]>2012-05-17 16:38:37 +0900
commit490fa452983b66048ce796f853b80bfae60c0388 (patch)
treef452e23e61274d933c2cda651a6f5b43f912c26f /src/codegen.c
parentd65542cca8c494b6f43f80600fe2bc6470bb3ad1 (diff)
downloadmruby-490fa452983b66048ce796f853b80bfae60c0388.tar.gz
mruby-490fa452983b66048ce796f853b80bfae60c0388.zip
add cast to remove warning; close #154
Diffstat (limited to 'src/codegen.c')
-rw-r--r--src/codegen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/codegen.c b/src/codegen.c
index ae5eafdf7..0abd9e67e 100644
--- a/src/codegen.c
+++ b/src/codegen.c
@@ -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();