All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix warnings from printf target addresses
@ 2012-09-16  0:05 Mike Frysinger
  2012-09-16  7:24 ` Blue Swirl
  2012-09-16  7:31 ` Jan Kiszka
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Frysinger @ 2012-09-16  0:05 UTC (permalink / raw)
  To: qemu-devel

Current code triggers:
memory.c: In function 'invalid_read':
memory.c:1001: warning: format '%#x' expects type 'unsigned int',
	but argument 4 has type 'target_phys_addr_t'
memory.c: In function 'invalid_write':
memory.c:1013: warning: format '%#x' expects type 'unsigned int',
	but argument 4 has type 'target_phys_addr_t'

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 memory.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/memory.c b/memory.c
index 58a242d..7d5f4a3 100644
--- a/memory.c
+++ b/memory.c
@@ -998,7 +998,8 @@ static uint64_t invalid_read(void *opaque, target_phys_addr_t addr,
     MemoryRegion *mr = opaque;
 
     if (!mr->warning_printed) {
-        fprintf(stderr, "Invalid read from memory region %s at offset %#x\n", mr->name, addr);
+        fprintf(stderr, "Invalid read from memory region %s at offset %#llx\n",
+                mr->name, (unsigned long long)addr);
         mr->warning_printed = true;
     }
     return -1U;
@@ -1010,7 +1011,8 @@ static void invalid_write(void *opaque, target_phys_addr_t addr, uint64_t data,
     MemoryRegion *mr = opaque;
 
     if (!mr->warning_printed) {
-        fprintf(stderr, "Invalid write to memory region %s at offset %#x\n", mr->name, addr);
+        fprintf(stderr, "Invalid write to memory region %s at offset %#llx\n",
+                mr->name, (unsigned long long)addr);
         mr->warning_printed = true;
     }
 }
-- 
1.7.9.7

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-16 19:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-16  0:05 [Qemu-devel] [PATCH] fix warnings from printf target addresses Mike Frysinger
2012-09-16  7:24 ` Blue Swirl
2012-09-16 19:38   ` Mike Frysinger
2012-09-16  7:31 ` Jan Kiszka
2012-09-16 19:46   ` [Qemu-devel] [PATCH] include address in invalid memory region accesses Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.