From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1McQiI-0005JD-0Z for qemu-devel@nongnu.org; Sat, 15 Aug 2009 17:22:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1McQiB-0005In-RT for qemu-devel@nongnu.org; Sat, 15 Aug 2009 17:22:56 -0400 Received: from [199.232.76.173] (port=39333 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McQiB-0005Ik-Ng for qemu-devel@nongnu.org; Sat, 15 Aug 2009 17:22:51 -0400 Received: from mail.gmx.net ([213.165.64.20]:33371) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1McQiA-0001WB-Ty for qemu-devel@nongnu.org; Sat, 15 Aug 2009 17:22:51 -0400 Message-ID: From: "Sebastian Herbszt" References: <5E1B286E7FAF486BB155E4BAA449061C@FSCPC><4A809630.10706@codemonkey.ws> In-Reply-To: Date: Sat, 15 Aug 2009 23:21:56 +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] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Hans de Bruin , qemu-devel@nongnu.org Sebastian Herbszt wrote: > Anthony Liguori wrote: >> Sebastian Herbszt wrote: >>> CC i386-softmmu/pci-hotplug.o >>> cc1: warnings being treated as errors >>> /v0.11.0-rc0-347-g562593a/hw/pci-hotplug.c: In function >>> 'pci_device_hot_add': >>> /v0.11.0-rc0-347-g562593a/hw/pci-hotplug.c:102: warning: 'dinfo' may >>> be used uninitialized in this function >>> /v0.11.0-rc0-347-g562593a/hw/pci-hotplug.c:102: note: 'dinfo' was >>> declared here >>> make[1]: *** [pci-hotplug.o] Error 1 >>> make: *** [subdir-i386-softmmu] Error 2 >> >> What version of gcc? > > gcc version 4.2.1 (SUSE Linux) > >> It's wrong, there's no way it can be uninitialized. Anthony, there is a second report [1] about this problem. The following patch makes the compiler happy. [1] http://lists.gnu.org/archive/html/qemu-devel/2009-08/msg00736.html - Sebastian --- 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];