diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-03 15:15:49 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-04 16:22:50 +0900 |
| commit | c2634e18b6dc8bf2b447e6f18699e3f4ed6f9474 (patch) | |
| tree | 9c12e8b99126ed6f2e9c8f29f6a65cd9bbe04b1a | |
| parent | 28c50b3e90e1ad75dfdd2bdaf0562e1e816ed977 (diff) | |
| download | mruby-c2634e18b6dc8bf2b447e6f18699e3f4ed6f9474.tar.gz mruby-c2634e18b6dc8bf2b447e6f18699e3f4ed6f9474.zip | |
Add type casts to silence MSVC warnings.
| -rw-r--r-- | mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 2 | ||||
| -rw-r--r-- | src/vm.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index 5c2b58da5..1880f22f7 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c @@ -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); @@ -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; |
