Fix several printf format warnings
This commit is contained in:
parent
8824504474
commit
ea06a145b6
5 changed files with 29 additions and 23 deletions
|
@ -527,7 +527,7 @@ Bitu CALLBACK_SetupExtra(Bitu callback, Bitu type, PhysPt physAddress, bool use_
|
|||
phys_writeb(physAddress+0x1B,(Bit8u)0xC3); //A RETN Instruction
|
||||
return (use_cb?32:27);
|
||||
default:
|
||||
E_Exit("CALLBACK:Setup:Illegal type %d",type);
|
||||
E_Exit("CALLBACK:Setup:Illegal type %lu", type);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -427,8 +427,13 @@ static void cache_closeblock(void) {
|
|||
Bitu written=cache.pos-block->cache.start;
|
||||
if (written>block->cache.size) {
|
||||
if (!block->cache.next) {
|
||||
if (written>block->cache.size+CACHE_MAXSIZE) E_Exit("CacheBlock overrun 1 %d",written-block->cache.size);
|
||||
} else E_Exit("CacheBlock overrun 2 written %d size %d",written,block->cache.size);
|
||||
if (written>block->cache.size+CACHE_MAXSIZE)
|
||||
E_Exit("CacheBlock overrun 1 %lu",
|
||||
written-block->cache.size);
|
||||
} else {
|
||||
E_Exit("CacheBlock overrun 2 written %lu size %lu",
|
||||
written, block->cache.size);
|
||||
}
|
||||
} else {
|
||||
Bitu new_size;
|
||||
Bitu left=block->cache.size-written;
|
||||
|
|
|
@ -366,7 +366,7 @@ static void dyn_fpu_esc3(){
|
|||
switch (sub) {
|
||||
case 0x00: //FNENI
|
||||
case 0x01: //FNDIS
|
||||
LOG(LOG_FPU,LOG_ERROR)("8087 only fpu code used esc 3: group 4: subfuntion :%d",sub);
|
||||
LOG(LOG_FPU,LOG_ERROR)("8087 only fpu code used esc 3: group 4: subfunction: %lu", sub);
|
||||
break;
|
||||
case 0x02: //FNCLEX FCLEX
|
||||
gen_call_function((void*)&FPU_FCLEX,"");
|
||||
|
@ -379,11 +379,11 @@ static void dyn_fpu_esc3(){
|
|||
// LOG(LOG_FPU,LOG_ERROR)("80267 protected mode (un)set. Nothing done");
|
||||
break;
|
||||
default:
|
||||
E_Exit("ESC 3:ILLEGAL OPCODE group %d subfunction %d",group,sub);
|
||||
E_Exit("ESC 3:ILLEGAL OPCODE group %lu subfunction %lu", group, sub);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3:Unhandled group %d subfunction %d",group,sub);
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3:Unhandled group %lu subfunction %lu", group, sub);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
@ -398,7 +398,7 @@ static void dyn_fpu_esc3(){
|
|||
gen_call_function((void*)&FPU_FLD_I32,"%Drd%Drd",DREG(EA),DREG(TMPB));
|
||||
break;
|
||||
case 0x01: /* FISTTP */
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3 EA:Unhandled group %d subfunction %d",group,sub);
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3 EA:Unhandled group %lu subfunction %lu", group, sub);
|
||||
break;
|
||||
case 0x02: /* FIST */
|
||||
gen_call_function((void*)&FPU_FST_I32,"%Drd",DREG(EA));
|
||||
|
@ -416,7 +416,7 @@ static void dyn_fpu_esc3(){
|
|||
gen_call_function((void*)&FPU_FPOP,"");
|
||||
break;
|
||||
default:
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3 EA:Unhandled group %d subfunction %d",group,sub);
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3 EA:Unhandled group %lu subfunction %lu", group, sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ static void dh_fpu_esc3(){
|
|||
switch (sub) {
|
||||
case 0x00: //FNENI
|
||||
case 0x01: //FNDIS
|
||||
LOG(LOG_FPU,LOG_ERROR)("8087 only fpu code used esc 3: group 4: subfuntion :%d",sub);
|
||||
LOG(LOG_FPU,LOG_ERROR)("8087 only fpu code used esc 3: group 4: subfunction: %lu", sub);
|
||||
break;
|
||||
case 0x02: //FNCLEX FCLEX
|
||||
cache_addb(0xdb);
|
||||
|
@ -255,11 +255,11 @@ static void dh_fpu_esc3(){
|
|||
// LOG(LOG_FPU,LOG_ERROR)("80267 protected mode (un)set. Nothing done");
|
||||
break;
|
||||
default:
|
||||
E_Exit("ESC 3:ILLEGAL OPCODE group %d subfunction %d",group,sub);
|
||||
E_Exit("ESC 3:ILLEGAL OPCODE group %lu subfunction %lu", group, sub);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3:Unhandled group %d subfunction %d",group,sub);
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3:Unhandled group %lu subfunction %lu", group, sub);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
@ -272,7 +272,7 @@ static void dh_fpu_esc3(){
|
|||
dh_fpu_mem(0xdb);
|
||||
break;
|
||||
case 0x01: /* FISTTP */
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3 EA:Unhandled group %d subfunction %d",group,sub);
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3 EA:Unhandled group %lu subfunction %lu", group, sub);
|
||||
break;
|
||||
case 0x02: /* FIST */
|
||||
dh_fpu_mem(0xdb);
|
||||
|
@ -291,7 +291,7 @@ static void dh_fpu_esc3(){
|
|||
gen_call_function((void*)&FPU_FST_80,"%Drd",DREG(EA));
|
||||
break;
|
||||
default:
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3 EA:Unhandled group %d subfunction %d",group,sub);
|
||||
LOG(LOG_FPU,LOG_WARN)("ESC 3 EA:Unhandled group %lu subfunction %lu", group, sub);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -349,7 +349,7 @@ bool CPU_SwitchTask(Bitu new_tss_selector,TSwitchType tstype,Bitu old_eip) {
|
|||
FillFlags();
|
||||
TaskStateSegment new_tss;
|
||||
if (!new_tss.SetSelector(new_tss_selector))
|
||||
E_Exit("Illegal TSS for switch, selector=%x, switchtype=%x",new_tss_selector,tstype);
|
||||
E_Exit("Illegal TSS for switch, selector=%lx, switchtype=%x", new_tss_selector, tstype);
|
||||
if (tstype==TSwitch_IRET) {
|
||||
if (!new_tss.desc.IsBusy())
|
||||
E_Exit("TSS not busy for IRET");
|
||||
|
@ -503,7 +503,7 @@ doconforming:
|
|||
Segs.val[cs]=new_cs;
|
||||
break;
|
||||
default:
|
||||
E_Exit("Task switch CS Type %d",cs_desc.Type());
|
||||
E_Exit("Task switch CS Type %lu", cs_desc.Type());
|
||||
}
|
||||
}
|
||||
CPU_SetSegGeneral(es,new_es);
|
||||
|
@ -725,7 +725,7 @@ do_interrupt:
|
|||
}
|
||||
break;
|
||||
default:
|
||||
E_Exit("INT:Gate Selector points to illegal descriptor with type %x",cs_desc.Type());
|
||||
E_Exit("INT:Gate Selector points to illegal descriptor with type %lx", cs_desc.Type());
|
||||
}
|
||||
|
||||
Segs.val[cs]=(gate_sel&0xfffc) | cpu.cpl;
|
||||
|
@ -755,7 +755,7 @@ do_interrupt:
|
|||
}
|
||||
return;
|
||||
default:
|
||||
E_Exit("Illegal descriptor type %X for int %X",gate.Type(),num);
|
||||
E_Exit("Illegal descriptor type %lX for int %lX", gate.Type(), num);
|
||||
}
|
||||
}
|
||||
assert(1);
|
||||
|
@ -902,7 +902,7 @@ void CPU_IRET(bool use32,Bitu oldeip) {
|
|||
EXCEPTION_GP,n_cs_sel & 0xfffc)
|
||||
break;
|
||||
default:
|
||||
E_Exit("IRET:Illegal descriptor type %X",n_cs_desc.Type());
|
||||
E_Exit("IRET:Illegal descriptor type %lX", n_cs_desc.Type());
|
||||
}
|
||||
CPU_CHECK_COND(!n_cs_desc.saved.seg.p,
|
||||
"IRET with nonpresent code segment",
|
||||
|
@ -1059,7 +1059,7 @@ CODE_jmp:
|
|||
CPU_SwitchTask(selector,TSwitch_JMP,oldeip);
|
||||
break;
|
||||
default:
|
||||
E_Exit("JMP Illegal descriptor type %X",desc.Type());
|
||||
E_Exit("JMP Illegal descriptor type %lX", desc.Type());
|
||||
}
|
||||
}
|
||||
assert(1);
|
||||
|
@ -1295,7 +1295,7 @@ call_code:
|
|||
CPU_Exception(EXCEPTION_GP,selector & 0xfffc);
|
||||
return;
|
||||
default:
|
||||
E_Exit("CALL:Descriptor type %x unsupported",call.Type());
|
||||
E_Exit("CALL:Descriptor type %lx unsupported", call.Type());
|
||||
}
|
||||
}
|
||||
assert(1);
|
||||
|
@ -1353,7 +1353,7 @@ void CPU_RET(bool use32,Bitu bytes,Bitu oldeip) {
|
|||
EXCEPTION_GP,selector & 0xfffc)
|
||||
break;
|
||||
default:
|
||||
E_Exit("RET from illegal descriptor type %X",desc.Type());
|
||||
E_Exit("RET from illegal descriptor type %lX", desc.Type());
|
||||
}
|
||||
RET_same_level:
|
||||
if (!desc.saved.seg.p) {
|
||||
|
@ -1398,7 +1398,7 @@ RET_same_level:
|
|||
EXCEPTION_GP,selector & 0xfffc)
|
||||
break;
|
||||
default:
|
||||
E_Exit("RET from illegal descriptor type %X",desc.Type()); // or #GP(selector)
|
||||
E_Exit("RET from illegal descriptor type %lX", desc.Type()); // or #GP(selector)
|
||||
}
|
||||
|
||||
CPU_CHECK_COND(!desc.saved.seg.p,
|
||||
|
@ -1509,7 +1509,8 @@ bool CPU_LTR(Bitu selector) {
|
|||
LOG(LOG_CPU,LOG_ERROR)("LTR failed, selector=%X (not present)",selector);
|
||||
return CPU_PrepareException(EXCEPTION_NP,selector);
|
||||
}
|
||||
if (!cpu_tss.SetSelector(selector)) E_Exit("LTR failed, selector=%X",selector);
|
||||
if (!cpu_tss.SetSelector(selector))
|
||||
E_Exit("LTR failed, selector=%lX", selector);
|
||||
cpu_tss.desc.SetBusy(true);
|
||||
cpu_tss.SaveSelector();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue