From patchwork Sat Aug 15 21:21:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Herbszt X-Patchwork-Id: 31477 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 bilbo.ozlabs.org (Postfix) with ESMTPS id A10F0B6EDF for ; Sun, 16 Aug 2009 07:23:27 +1000 (EST) Received: from localhost ([127.0.0.1]:58914 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McQii-0005JV-Jy for incoming@patchwork.ozlabs.org; Sat, 15 Aug 2009 17:23:24 -0400 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 Received: (qmail invoked by alias); 15 Aug 2009 21:22:47 -0000 Received: from p54BD2A65.dip0.t-ipconnect.de (HELO FSCPC) [84.189.42.101] by mail.gmx.net (mp023) with SMTP; 15 Aug 2009 23:22:47 +0200 X-Authenticated: #310364 X-Provags-ID: V01U2FsdGVkX19eGz4KcnpeN77BTksXHbD9ga+ufUakTlo+be2kGP SixIuqxTCh6GL1 Message-ID: From: "Sebastian Herbszt" To: "Anthony Liguori" References: <5E1B286E7FAF486BB155E4BAA449061C@FSCPC><4A809630.10706@codemonkey.ws> In-Reply-To: Date: Sat, 15 Aug 2009 23:21:56 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16669 X-Y-GMX-Trusted: 0 X-FuHaFi: 0.52 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Hans de Bruin , qemu-devel@nongnu.org Subject: [Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure 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 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];