From: Alexandre Raymond Date: Sun, 29 May 2011 22:22:50 +0000 (-0400) Subject: Remove warning in printf due to type mismatch X-Git-Tag: v0.15.0-rc0~162^2~6 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=sidebyside;h=dfa5294fce3e035192b283fe0b6fd08be48d78da;p=qemu.git Remove warning in printf due to type mismatch ----8<---- qemu/target-lm32/translate.c: In function ‘gen_intermediate_code_internal’: qemu/target-lm32/translate.c:1135: warning: format ‘%zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’ ----8<---- Both gen_opc_ptr and gen_opc_buf are "uint16_t *". The difference between pointers is a ptrdiff_t so printf needs '%td'. Signed-off-by: Alexandre Raymond Acked-by: Stefan Weil Signed-off-by: Andreas Färber --- diff --git a/target-lm32/translate.c b/target-lm32/translate.c index eb2115814..5e197258e 100644 --- a/target-lm32/translate.c +++ b/target-lm32/translate.c @@ -1132,7 +1132,7 @@ static void gen_intermediate_code_internal(CPUState *env, if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) { qemu_log("\n"); log_target_disas(pc_start, dc->pc - pc_start, 0); - qemu_log("\nisize=%d osize=%zd\n", + qemu_log("\nisize=%d osize=%td\n", dc->pc - pc_start, gen_opc_ptr - gen_opc_buf); } #endif