[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] Fix compiler warning on parsing the -usbdevice
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [PATCH] Fix compiler warning on parsing the -usbdevice parameter |
Date: |
Mon, 08 Mar 2010 08:58:30 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Niels de Vos wrote:
> Ah, just noticed this warning is only in Jans git... For those who
> were wondering :)
Yes, and I forgot to push my fixup. Thanks nevertheless.
Jan
>
> Cheers,
> Niels
>
> On 3/7/10, Niels de Vos <address@hidden> wrote:
>> 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);
>> }
>>
signature.asc
Description: OpenPGP digital signature