printf: cast variables to the expected type

%x expects unsigned int and %p expects void *

GCC emits a diagnostic about %p/void* in pedantic mode:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26542
This commit is contained in:
cremno
2014-08-26 00:30:33 +02:00
parent 73a012c808
commit bdf6ce34ce
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2715,7 +2715,7 @@ codedump(mrb_state *mrb, mrb_irep *irep)
int32_t line;
if (!irep) return;
printf("irep %p nregs=%d nlocals=%d pools=%d syms=%d reps=%d\n", irep,
printf("irep %p nregs=%d nlocals=%d pools=%d syms=%d reps=%d\n", (void*)irep,
irep->nregs, irep->nlocals, (int)irep->plen, (int)irep->slen, (int)irep->rlen);
for (i = 0; i < (int)irep->ilen; i++) {