Suppress some warnings about pointer casting.

This commit is contained in:
Masamitsu MURASE
2012-07-14 23:04:33 +09:00
parent 72f7c51bc0
commit 15f0c161d1
+2 -2
View File
@@ -688,7 +688,7 @@ new_float(parser_state *p, const char *s)
static node*
new_str(parser_state *p, const char *s, int len)
{
return cons((node*)NODE_STR, cons((node*)strndup(s, len), (node*)len));
return cons((node*)NODE_STR, cons((node*)strndup(s, len), (node*)(intptr_t)len));
}
// (:dstr . a)
@@ -4708,7 +4708,7 @@ parser_update_cxt(parser_state *p, mrbc_context *cxt)
int i = 0;
if (!cxt) return;
if ((int)p->tree->car != NODE_SCOPE) return;
if ((int)(intptr_t)p->tree->car != NODE_SCOPE) return;
n0 = n = p->tree->cdr->car;
while (n) {
i++;