From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NoXtE-0002um-7B for qemu-devel@nongnu.org; Mon, 08 Mar 2010 03:00:36 -0500 Received: from [199.232.76.173] (port=44348 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoXtA-0002rV-R5 for qemu-devel@nongnu.org; Mon, 08 Mar 2010 03:00:32 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NoXt8-0002En-O3 for qemu-devel@nongnu.org; Mon, 08 Mar 2010 03:00:32 -0500 Received: from mx20.gnu.org ([199.232.41.8]:47839) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NoXt8-0002EM-1c for qemu-devel@nongnu.org; Mon, 08 Mar 2010 03:00:30 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NoXsg-0003LC-Vx for qemu-devel@nongnu.org; Mon, 08 Mar 2010 03:00:03 -0500 Message-ID: <4B94AE26.9090504@web.de> Date: Mon, 08 Mar 2010 08:58:30 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1b51b6f81003071227h2c29dd44y143eb81c7f42b3c4@mail.gmail.com> <1b51b6f81003071242x4d6ecbdas7fa072256718cbe5@mail.gmail.com> In-Reply-To: <1b51b6f81003071242x4d6ecbdas7fa072256718cbe5@mail.gmail.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3CA6A2AE8DDD30FBE1D46B42" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] Fix compiler warning on parsing the -usbdevice parameter List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Niels de Vos Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3CA6A2AE8DDD30FBE1D46B42 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 >=20 > Cheers, > Niels >=20 > On 3/7/10, Niels de Vos wrote: >> With the added checks on the parameter for -usbdevice, the following >> warning got introduced: >> >> hw/usb-bus.c: In function =E2=80=98usbdevice_create=E2=80=99: >> hw/usb-bus.c:278: error: assignment discards qualifiers from pointer t= arget >> type >> >> It is okay to drop the qualifier (const) from the empty string here. >> >> Signed-off-by: Niels de Vos >> >> 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 =3D sizeof(driver); >> pstrcpy(driver, len, cmdline); >> } else { >> - params =3D ""; >> + params =3D (char*) ""; >> pstrcpy(driver, sizeof(driver), cmdline); >> } >> --------------enig3CA6A2AE8DDD30FBE1D46B42 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkuUrikACgkQitSsb3rl5xR2nACgu9eUR1SUvI9HGrf09l/LLKyB uK0An1ipZGyaqdbqCaI/8pOV+ydjk3aZ =28Lh -----END PGP SIGNATURE----- --------------enig3CA6A2AE8DDD30FBE1D46B42--