OSDN Git Service

target-ppc: Cast ssize_t to size_t before printing with %zx
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Dec 2014 22:22:16 +0000 (22:22 +0000)
committerAlexander Graf <agraf@suse.de>
Wed, 7 Jan 2015 15:16:28 +0000 (16:16 +0100)
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

index 720aab5..2850624 100644 (file)
@@ -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);
         exit(1);
     }
     g_free(filename);