Skip to contentSkip to conversation

target-cris: Use %td for ptrdiff_t arguments in debug message

PATCH In review Stefan Weil 2 participants 3 messages Oct 2, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 target-cris: Use %td for ptrdiff_t arguments in debug message

According to ISO/IEC 9899:1999 7.19.6.1,
the correct length modifier for ptrdiff_t is 't', not 'z'.

Cc Blue Swirl <[email protected]>
Cc Markus Armbruster <[email protected]>
---
 target-cris/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-cris/translate.c +1 -1
index 45c7682..8361369 100644
@@ -3409,7 +3409,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
 	if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM)) {
 		log_target_disas(pc_start, dc->pc - pc_start,
                                  dc->env->pregs[PR_VR]);
-		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
Signature · 1 line
1.7.1
#1 lore raw

PATCH 2/2 target-microblaze: Use %td for ptrdiff_t arguments in debug message

According to ISO/IEC 9899:1999 7.19.6.1,
the correct length modifier for ptrdiff_t is 't', not 'z'.

Cc Blue Swirl <[email protected]>
Cc Markus Armbruster <[email protected]>
---
 target-microblaze/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-microblaze/translate.c +1 -1
index 6c305d4..38149bb 100644
@@ -1516,7 +1516,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
 #if DISAS_GNU
         log_target_disas(pc_start, dc->pc - pc_start, 0);
 #endif
-        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
Signature · 1 line
1.7.1
#2 lore raw

Re: [Qemu-devel] [PATCH 2/2] target-microblaze: Use %td for ptrdiff_t arguments in debug message

Quoted 6 lines · Stefan Weil

According to ISO/IEC 9899:1999 7.19.6.1,
the correct length modifier for ptrdiff_t is 't', not 'z'.

Cc Blue Swirl <[email protected]>
Cc Markus Armbruster <[email protected]>

Applied both this one and the cris patch.

Thanks

Quoted 21 lines
---
 target-microblaze/translate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-microblaze/translate.c +1 -1
index 6c305d4..38149bb 100644
@@ -1516,7 +1516,7 @@ gen_intermediate_code_internal(CPUState *env, TranslationBlock *tb,
 #if DISAS_GNU
         log_target_disas(pc_start, dc->pc - pc_start, 0);
 #endif
-        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
Signature · 1 line
1.7.1