diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-07-15 00:24:38 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-07-15 00:24:38 -0700 |
| commit | 9df3552b8e894ce40025e3a130658306552c2937 (patch) | |
| tree | daa394752b613cc9d03050f879d907e04efb5962 | |
| parent | 72f7c51bc0bcef4096db8d57e7e5ab2a342e383f (diff) | |
| parent | 15f0c161d1f9bdbfa759be47bc54bc290ef51dd0 (diff) | |
| download | mruby-9df3552b8e894ce40025e3a130658306552c2937.tar.gz mruby-9df3552b8e894ce40025e3a130658306552c2937.zip | |
Merge pull request #369 from masamitsu-murase/suppress_warning_about_pointer_casting
Suppress some warnings about pointer typecasting.
| -rw-r--r-- | src/parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y index c766b3927..48823233f 100644 --- a/src/parse.y +++ b/src/parse.y @@ -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++; |
