[Pdbg] [PATCH] p8chip: Fix printf format warnings
Joel Stanley
joel at jms.id.au
Wed Mar 27 15:26:48 AEDT 2019
When building for powerpc64:
libpdbg/p8chip.c: In function ‘emulate_sreset’:
libpdbg/p8chip.c:493:36: error: format ‘%llx’ expects argument of type
‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long
unsigned int’} [-Werror=format=]
printf("emulate sreset old NIA:%llx MSR:%llx\n", old_nia, old_msr);
~~~^ ~~~~~~~
%lx
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
libpdbg/p8chip.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
index 062da3993111..5bd790143cbf 100644
--- a/libpdbg/p8chip.c
+++ b/libpdbg/p8chip.c
@@ -490,8 +490,10 @@ static int emulate_sreset(struct thread *thread)
new_msr |= MSR_LE;
else
new_msr &= ~MSR_LE;
- printf("emulate sreset old NIA:%llx MSR:%llx\n", old_nia, old_msr);
- printf("emulate sreset new NIA:%llx MSR:%llx\n", new_nia, new_msr);
+ printf("emulate sreset old NIA:%"PRIx64" MSR:%"PRIx64"\n",
+ old_nia, old_msr);
+ printf("emulate sreset new NIA:%"PRIx64" MSR:%"PRIx64"\n",
+ new_nia, new_msr);
CHECK_ERR(ram_putspr(&thread->target, SPR_SRR0, old_nia));
CHECK_ERR(ram_putspr(&thread->target, SPR_SRR1, old_msr));
CHECK_ERR(ram_putnia(&thread->target, new_nia));
--
2.20.1
More information about the Pdbg
mailing list