From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TD2MM-0004IS-Vn for qemu-devel@nongnu.org; Sat, 15 Sep 2012 20:05:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TD2ML-0003nb-VJ for qemu-devel@nongnu.org; Sat, 15 Sep 2012 20:05:14 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:52791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TD2ML-0003n9-OR for qemu-devel@nongnu.org; Sat, 15 Sep 2012 20:05:13 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id EB59E33C9F6 for ; Sun, 16 Sep 2012 00:05:12 +0000 (UTC) From: Mike Frysinger Date: Sat, 15 Sep 2012 20:05:13 -0400 Message-Id: <1347753913-5305-1-git-send-email-vapier@gentoo.org> Subject: [Qemu-devel] [PATCH] fix warnings from printf target addresses List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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