Cast to `void *` for '%p' format specifiers.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This commit is contained in:
OGINO Masanori 2014-01-05 18:10:33 +09:00
parent da1eb0bc10
commit ceffd8a3bd
4 changed files with 9 additions and 9 deletions

View File

@ -1052,7 +1052,7 @@ print_irep(pic_state *pic, struct pic_irep *irep)
{
int i;
printf("## irep %p\n", irep);
printf("## irep %p\n", (void *)irep);
printf("[clen = %zd, ccapa = %zd, argc = %d, localc = %d]\n", irep->clen, irep->ccapa, irep->argc, irep->localc);
printf(":: cv_num = %d\n", irep->cv_num);
for (i = 0; i < irep->cv_num; ++i) {

View File

@ -29,7 +29,7 @@ init_heap(struct pic_heap *heap)
heap->pages = NULL;
#if GC_DEBUG
printf("freep = %p\n", heap->freep);
printf("freep = %p\n", (void *)heap->freep);
#endif
}

View File

@ -59,10 +59,10 @@ write(pic_state *pic, pic_value obj)
printf("#<undef>");
break;
case PIC_TT_PROC:
printf("#<proc %p>", pic_proc_ptr(obj));
printf("#<proc %p>", pic_ptr(obj));
break;
case PIC_TT_PORT:
printf("#<port %p>", pic_port_ptr(obj));
printf("#<port %p>", pic_ptr(obj));
break;
case PIC_TT_STRING:
printf("\"");
@ -93,7 +93,7 @@ write(pic_state *pic, pic_value obj)
printf("#<error %p>", pic_ptr(obj));
break;
case PIC_TT_ENV:
printf("#<env %p>", pic_env_ptr(obj));
printf("#<env %p>", pic_ptr(obj));
break;
case PIC_TT_CONT:
printf("#<cont %p>", pic_ptr(obj));

View File

@ -359,7 +359,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
print_irep(pic, proc->u.irep);
}
else {
printf(" cfunc = %p\n", proc->u.cfunc);
printf(" cfunc = %p\n", (void *)proc->u.cfunc);
}
puts("\nLet's go!");
#endif
@ -492,7 +492,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
print_irep(pic, proc->u.irep);
}
else {
printf(" cfunc = %p\n", proc->u.cfunc);
printf(" cfunc = %p\n", (void *)proc->u.cfunc);
}
puts("");
#endif
@ -718,8 +718,8 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
#if VM_DEBUG
puts("**VM END STATE**");
printf("stbase\t= %p\nsp\t= %p\n", pic->stbase, pic->sp);
printf("cibase\t= %p\nci\t= %p\n", pic->cibase, pic->ci);
printf("stbase\t= %p\nsp\t= %p\n", (void *)pic->stbase, (void *)pic->sp);
printf("cibase\t= %p\nci\t= %p\n", (void *)pic->cibase, (void *)pic->ci);
if (pic->stbase < pic->sp) {
pic_value *sp;
printf("* stack trace:");