diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-25 16:58:01 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-08-25 16:58:01 +0900 |
| commit | 471288f37d18e640f98029fabcdcb7ee16b95d93 (patch) | |
| tree | 0624dcf5f681c61b4f59b8e15441f02c9d0cab62 /src/codedump.c | |
| parent | d79dbd92f9104712c6cf41ab3c029dec318a757d (diff) | |
| download | mruby-471288f37d18e640f98029fabcdcb7ee16b95d93.tar.gz mruby-471288f37d18e640f98029fabcdcb7ee16b95d93.zip | |
Reduce integer casting warnings.
Diffstat (limited to 'src/codedump.c')
| -rw-r--r-- | src/codedump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/codedump.c b/src/codedump.c index 9174ebe3d..80802778f 100644 --- a/src/codedump.c +++ b/src/codedump.c @@ -48,7 +48,7 @@ print_lv_ab(mrb_state *mrb, mrb_irep *irep, uint16_t a, uint16_t b) #endif static void -print_header(mrb_irep *irep, int i) +print_header(mrb_irep *irep, ptrdiff_t i) { int32_t line; @@ -60,7 +60,7 @@ print_header(mrb_irep *irep, int i) printf("%5d ", line); } - printf("%03d ", i); + printf("%03d ", (int)i); } #define CASE(insn,ops) case insn: FETCH_ ## ops (); L_ ## insn @@ -91,7 +91,7 @@ codedump(mrb_state *mrb, mrb_irep *irep) pc = irep->iseq; pcend = pc + irep->ilen; while (pc < pcend) { - int i; + ptrdiff_t i; uint32_t a; uint16_t b; uint8_t c; |
