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; 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("[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); printf(":: cv_num = %d\n", irep->cv_num);
for (i = 0; i < irep->cv_num; ++i) { for (i = 0; i < irep->cv_num; ++i) {

View File

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

View File

@ -59,10 +59,10 @@ write(pic_state *pic, pic_value obj)
printf("#<undef>"); printf("#<undef>");
break; break;
case PIC_TT_PROC: case PIC_TT_PROC:
printf("#<proc %p>", pic_proc_ptr(obj)); printf("#<proc %p>", pic_ptr(obj));
break; break;
case PIC_TT_PORT: case PIC_TT_PORT:
printf("#<port %p>", pic_port_ptr(obj)); printf("#<port %p>", pic_ptr(obj));
break; break;
case PIC_TT_STRING: case PIC_TT_STRING:
printf("\""); printf("\"");
@ -93,7 +93,7 @@ write(pic_state *pic, pic_value obj)
printf("#<error %p>", pic_ptr(obj)); printf("#<error %p>", pic_ptr(obj));
break; break;
case PIC_TT_ENV: case PIC_TT_ENV:
printf("#<env %p>", pic_env_ptr(obj)); printf("#<env %p>", pic_ptr(obj));
break; break;
case PIC_TT_CONT: case PIC_TT_CONT:
printf("#<cont %p>", pic_ptr(obj)); 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); print_irep(pic, proc->u.irep);
} }
else { else {
printf(" cfunc = %p\n", proc->u.cfunc); printf(" cfunc = %p\n", (void *)proc->u.cfunc);
} }
puts("\nLet's go!"); puts("\nLet's go!");
#endif #endif
@ -492,7 +492,7 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
print_irep(pic, proc->u.irep); print_irep(pic, proc->u.irep);
} }
else { else {
printf(" cfunc = %p\n", proc->u.cfunc); printf(" cfunc = %p\n", (void *)proc->u.cfunc);
} }
puts(""); puts("");
#endif #endif
@ -718,8 +718,8 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
#if VM_DEBUG #if VM_DEBUG
puts("**VM END STATE**"); puts("**VM END STATE**");
printf("stbase\t= %p\nsp\t= %p\n", pic->stbase, pic->sp); printf("stbase\t= %p\nsp\t= %p\n", (void *)pic->stbase, (void *)pic->sp);
printf("cibase\t= %p\nci\t= %p\n", pic->cibase, pic->ci); printf("cibase\t= %p\nci\t= %p\n", (void *)pic->cibase, (void *)pic->ci);
if (pic->stbase < pic->sp) { if (pic->stbase < pic->sp) {
pic_value *sp; pic_value *sp;
printf("* stack trace:"); printf("* stack trace:");