qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Fix compiler warning on parsing the -usbdevice para


From: Niels de Vos
Subject: [Qemu-devel] [PATCH] Fix compiler warning on parsing the -usbdevice parameter
Date: Sun, 7 Mar 2010 20:27:19 +0000

With the added checks on the parameter for -usbdevice, the following
warning got introduced:

hw/usb-bus.c: In function ‘usbdevice_create’:
hw/usb-bus.c:278: error: assignment discards qualifiers from pointer target type

It is okay to drop the qualifier (const) from the empty string here.

Signed-off-by: Niels de Vos <address@hidden>

diff --git a/hw/usb-bus.c b/hw/usb-bus.c
index 89e2ea6..d058e14 100644
--- a/hw/usb-bus.c
+++ b/hw/usb-bus.c
@@ -275,7 +275,7 @@ USBDevice *usbdevice_create(const char *cmdline)
             len = sizeof(driver);
         pstrcpy(driver, len, cmdline);
     } else {
-        params = "";
+        params = (char*) "";
         pstrcpy(driver, sizeof(driver), cmdline);
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]