]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
target-mips: fix get_physical_address() #if 0 build error
authorJames Hogan <james.hogan@imgtec.com>
Tue, 27 Aug 2013 16:48:36 +0000 (17:48 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Wed, 28 Aug 2013 17:28:02 +0000 (19:28 +0200)
In get_physical_address() is a qemu_log() call inside an #if 0 block.
When enabled the following build error is hit:

target-mips/helper.c In function ‘get_physical_address’:
target-mips/helper.c:220:13: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘hwaddr’ [-Werror=format]

Fix the *physical (hwaddr) formatting by using "%"HWADDR_PRIx instead of
TARGET_FMT_lx.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips/helper.c

index 6feef7bcd61d0d017b35d0380cb4503318f8ec96..33e0e8863772f0eec7c8a4e108b2bedc8430c895 100644 (file)
@@ -193,7 +193,7 @@ static int get_physical_address (CPUMIPSState *env, hwaddr *physical,
         }
     }
 #if 0
-    qemu_log(TARGET_FMT_lx " %d %d => " TARGET_FMT_lx " %d (%d)\n",
+    qemu_log(TARGET_FMT_lx " %d %d => %" HWADDR_PRIx " %d (%d)\n",
             address, rw, access_type, *physical, *prot, ret);
 #endif