From d2f267a13dcce67e45ef358e1f133362b0a1c12e Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 15 Jun 2020 15:56:42 +0900 Subject: Add casts to silence warnings. --- mrbgems/mruby-compiler/core/codegen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mrbgems/mruby-compiler') diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index 25e157736..14b53d073 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -612,13 +613,13 @@ new_lit(codegen_scope *s, mrb_value val) switch (mrb_type(val)) { case MRB_TT_STRING: if (RSTR_NOFREE_P(RSTRING(val))) { - pv->tt = (RSTRING_LEN(val)<<2) | IREP_TT_SSTR; + pv->tt = (uint32_t)(RSTRING_LEN(val)<<2) | IREP_TT_SSTR; pv->u.str = RSTRING_PTR(val); } else { char *p; mrb_int len = RSTRING_LEN(val); - pv->tt = (len<<2) | IREP_TT_STR; + pv->tt = (uint32_t)(len<<2) | IREP_TT_STR; p = (char*)codegen_realloc(s, NULL, len+1); memcpy(p, RSTRING_PTR(val), len); p[len] = '\0'; -- cgit v1.2.3