From patchwork Sun Mar 7 20:27:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Niels de Vos X-Patchwork-Id: 47094 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F358BB6ED0 for ; Mon, 8 Mar 2010 07:36:37 +1100 (EST) Received: from localhost ([127.0.0.1]:43031 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoN60-0000KW-By for incoming@patchwork.ozlabs.org; Sun, 07 Mar 2010 15:29:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NoN4Q-00009T-CQ for qemu-devel@nongnu.org; Sun, 07 Mar 2010 15:27:26 -0500 Received: from [199.232.76.173] (port=44468 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoN4P-000092-Ir for qemu-devel@nongnu.org; Sun, 07 Mar 2010 15:27:25 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NoN4O-0003VD-3x for qemu-devel@nongnu.org; Sun, 07 Mar 2010 15:27:25 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:35416) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NoN4M-0003Uv-5j for qemu-devel@nongnu.org; Sun, 07 Mar 2010 15:27:23 -0500 Received: by wyb36 with SMTP id 36so2752273wyb.4 for ; Sun, 07 Mar 2010 12:27:20 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.180.202 with SMTP id j52mr2002179wem.214.1267993639927; Sun, 07 Mar 2010 12:27:19 -0800 (PST) Date: Sun, 7 Mar 2010 20:27:19 +0000 X-Google-Sender-Auth: 1c7bae96841409ab Message-ID: <1b51b6f81003071227h2c29dd44y143eb81c7f42b3c4@mail.gmail.com> From: Niels de Vos To: Jan Kiszka X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] Fix compiler warning on parsing the -usbdevice parameter X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 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); }