diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-26 11:09:42 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-07-26 11:09:42 +0900 |
| commit | b4696c3935a4917e49b1d4f0f6bad4b0108bfb57 (patch) | |
| tree | b79dc61bf7ad1727f19cd82a334bd8c3baa41012 /src/debug.c | |
| parent | 642497fe1950f28b3d769b0750ef59a73e4ed700 (diff) | |
| download | mruby-b4696c3935a4917e49b1d4f0f6bad4b0108bfb57.tar.gz mruby-b4696c3935a4917e49b1d4f0f6bad4b0108bfb57.zip | |
debug.c: remove type cast warnings.
Diffstat (limited to 'src/debug.c')
| -rw-r--r-- | src/debug.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/debug.c b/src/debug.c index 203dcf981..51f819aea 100644 --- a/src/debug.c +++ b/src/debug.c @@ -82,10 +82,10 @@ select_line_type(const uint16_t *lines, size_t lines_len) { size_t line_count = 0; size_t packed_map_len = 0; - uint32_t prev_line = 0; - uint32_t prev_pc = 0; - size_t i; - for (i = 0; i < lines_len; ++i) { + uint16_t prev_line = 0; + size_t prev_pc = 0; + + for (size_t i = 0; i < lines_len; ++i) { if (lines[i] != prev_line) { packed_map_len += packed_int_len(lines[i]-prev_line); prev_line = lines[i]; @@ -261,7 +261,7 @@ mrb_debug_info_append_file(mrb_state *mrb, mrb_irep_debug_info *d, } case mrb_debug_line_packed_map: { - uint32_t prev_line = 0; + uint16_t prev_line = 0; uint32_t prev_pc = 0; size_t packed_size = 0; uint8_t *p, *pend; |
