qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix compiler warning on parsing the -usbdevice parameter
@ 2010-03-07 20:27 Niels de Vos
  2010-03-07 20:42 ` [Qemu-devel] " Niels de Vos
  0 siblings, 1 reply; 3+ messages in thread
From: Niels de Vos @ 2010-03-07 20:27 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel

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 <nixpanic@users.sourceforge.net>

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);
     }

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-08  8:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-07 20:27 [Qemu-devel] [PATCH] Fix compiler warning on parsing the -usbdevice parameter Niels de Vos
2010-03-07 20:42 ` [Qemu-devel] " Niels de Vos
2010-03-08  7:58   ` Jan Kiszka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).