From: "Sebastian Herbszt" <herbszt@gmx.de>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Hans de Bruin <bruinjm@xs4all.nl>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure
Date: Sat, 15 Aug 2009 23:21:56 +0200 [thread overview]
Message-ID: <D5E423455F0B45639F15188EA7CD26DA@FSCPC> (raw)
In-Reply-To: <B105FF000E5D4FAEB2A191577E04EA9F@FSCPC>
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];
next prev parent reply other threads:[~2009-08-15 21:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-10 21:16 [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure Sebastian Herbszt
2009-08-10 21:50 ` Anthony Liguori
2009-08-10 22:00 ` Sebastian Herbszt
2009-08-15 21:21 ` Sebastian Herbszt [this message]
2009-08-15 23:17 ` [Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure Anthony Liguori
2009-08-15 21:32 ` [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure Sebastian Herbszt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=D5E423455F0B45639F15188EA7CD26DA@FSCPC \
--to=herbszt@gmx.de \
--cc=anthony@codemonkey.ws \
--cc=bruinjm@xs4all.nl \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).