Merge pull request #13 from omasanori/isoc-part-1

Improve ISO C Conformance and Remove Warnings: Part 1
This commit is contained in:
Yuichi Nishiwaki 2014-01-07 21:56:07 -08:00
commit e067ab64c9
5 changed files with 10 additions and 10 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

@ -94,7 +94,7 @@ infnan "+inf.0"|"-inf.0"|"+nan.0"|"-nan.0"
<CHAR>alarm { yylvalp->c = '\a'; BEGIN(INITIAL); return tCHAR; }
<CHAR>backspace { yylvalp->c = '\b'; BEGIN(INITIAL); return tCHAR; }
<CHAR>delete { yylvalp->c = 0x7f; BEGIN(INITIAL); return tCHAR; }
<CHAR>escape { yylvalp->c = '\e'; BEGIN(INITIAL); return tCHAR; }
<CHAR>escape { yylvalp->c = 0x1b; BEGIN(INITIAL); return tCHAR; }
<CHAR>newline { yylvalp->c = '\n'; BEGIN(INITIAL); return tCHAR; }
<CHAR>null { yylvalp->c = '\0'; BEGIN(INITIAL); return tCHAR; }
<CHAR>return { yylvalp->c = '\r'; BEGIN(INITIAL); return tCHAR; }

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:");