Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MceXp-0005sF-LV for qemu-devel@nongnu.org; Sun, 16 Aug 2009 08:09:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MceXl-0005fd-5D for qemu-devel@nongnu.org; Sun, 16 Aug 2009 08:09:05 -0400 Received: from [199.232.76.173] (port=44621 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MceXl-0005fH-1y for qemu-devel@nongnu.org; Sun, 16 Aug 2009 08:09:01 -0400 Received: from mail.gmx.net ([213.165.64.20]:45256) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MceXk-0006Yx-Ck for qemu-devel@nongnu.org; Sun, 16 Aug 2009 08:09:00 -0400 Message-ID: <47AA2367F2864C4D8A6B856E35FA189D@FSCPC> From: "Sebastian Herbszt" Date: Sun, 16 Aug 2009 14:07:54 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] pci-hotplug: initialize dinfo to NULL in pci_device_hot_add List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Suppress the following compiler warning emitted by at least gcc version 4.2.1 (SUSE Linux) and gcc version 3.4.5 (mingw32 special): hw/pci-hotplug.c: In function 'pci_device_hot_add': hw/pci-hotplug.c:102: warning: 'dinfo' may be used uninitialized in this function hw/pci-hotplug.c:102: note: 'dinfo' was declared here Signed-off-by: Sebastian Herbszt --- a/hw/pci-hotplug.c +++ b/hw/pci-hotplug.c @@ -99,7 +99,7 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon, const char *opts) { PCIDevice *dev; - DriveInfo *dinfo; + DriveInfo *dinfo = NULL; int type = -1; char buf[128];