Add type casts to silence MSVC warnings.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-09-03 15:15:49 +09:00
parent 28c50b3e90
commit c2634e18b6
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ p(mrb_state *mrb, mrb_value obj, int prompt)
if (!mrb_string_p(val)) {
val = mrb_obj_as_string(mrb, obj);
}
msg = mrb_locale_from_utf8(RSTRING_PTR(val), RSTRING_LEN(val));
msg = mrb_locale_from_utf8(RSTRING_PTR(val), (int)RSTRING_LEN(val));
fwrite(msg, strlen(msg), 1, stdout);
mrb_locale_free(msg);
putc('\n', stdout);
+1 -1
View File
@@ -186,7 +186,7 @@ stack_extend_alloc(mrb_state *mrb, mrb_int room)
if (off > size) size = off;
#ifdef MRB_STACK_EXTEND_DOUBLING
if (room <= size)
if (room <= (size_t)size)
size *= 2;
else
size += room;