mips_fulong2e: Fix format strings
authorStefan Weil <weil@mail.berlios.de>
Mon, 20 Sep 2010 20:18:00 +0000 (22:18 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Tue, 21 Sep 2010 18:55:02 +0000 (18:55 +0000)
Fix two compiler warnings (when format attribute is applied)
and one error (missing %) in format strings.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/mips_fulong2e.c

index ac82067acb19f88ccf451b0fd37bfb9d4b7d03e9..61ca9c42095a78cd81f28a2b18da4993b12be128 100644 (file)
@@ -141,13 +141,13 @@ static int64_t load_kernel (CPUState *env)
     prom_size = ENVP_NB_ENTRIES * (sizeof(int32_t) + ENVP_ENTRY_SIZE);
     prom_buf = qemu_malloc(prom_size);
 
-    prom_set(prom_buf, index++, loaderparams.kernel_filename);
+    prom_set(prom_buf, index++, "%s", loaderparams.kernel_filename);
     if (initrd_size > 0) {
-        prom_set(prom_buf, index++, "rd_start=0x" PRIx64 " rd_size=%li %s",
+        prom_set(prom_buf, index++, "rd_start=0x%" PRIx64 " rd_size=%li %s",
                  cpu_mips_phys_to_kseg0(NULL, initrd_offset), initrd_size,
                  loaderparams.kernel_cmdline);
     } else {
-        prom_set(prom_buf, index++, loaderparams.kernel_cmdline);
+        prom_set(prom_buf, index++, "%s", loaderparams.kernel_cmdline);
     }
 
     /* Setup minimum environment variables */