[PULL,31/37] target-ppc: Cast ssize_t to size_t before printing with %zx

Message ID 1420644048-16919-32-git-send-email-agraf@suse.de
State Accepted
Commit 2f285bdd54bb2ff25a213b3b77e9bf46f4306320
Headers show

Commit Message

Alexander Graf Jan. 7, 2015, 3:20 p.m.
From: Peter Maydell <peter.maydell@linaro.org>

The mingw32 compiler complains about trying to print variables of type
ssize_t with the %z format string specifier. Since we're printing it
as unsigned hex anyway, cast to size_t to silence the warning.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
 hw/ppc/spapr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 720aab5..2850624 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1482,7 +1482,7 @@  static void ppc_spapr_init(MachineState *machine)
     if (spapr->rtas_size > RTAS_MAX_SIZE) {
         hw_error("RTAS too big ! 0x%zx bytes (max is 0x%x)\n",
-                 spapr->rtas_size, RTAS_MAX_SIZE);
+                 (size_t)spapr->rtas_size, RTAS_MAX_SIZE);