qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure
@ 2009-08-10 21:16 Sebastian Herbszt
  2009-08-10 21:50 ` Anthony Liguori
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Herbszt @ 2009-08-10 21:16 UTC (permalink / raw)
  To: qemu-devel

  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

- Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure
  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:32   ` [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure Sebastian Herbszt
  0 siblings, 2 replies; 6+ messages in thread
From: Anthony Liguori @ 2009-08-10 21:50 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: qemu-devel

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?

It's wrong, there's no way it can be uninitialized.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure
  2009-08-10 21:50 ` Anthony Liguori
@ 2009-08-10 22:00   ` Sebastian Herbszt
  2009-08-15 21:21     ` [Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure Sebastian Herbszt
  2009-08-15 21:32   ` [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure Sebastian Herbszt
  1 sibling, 1 reply; 6+ messages in thread
From: Sebastian Herbszt @ 2009-08-10 22:00 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

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.

- Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure
  2009-08-10 22:00   ` Sebastian Herbszt
@ 2009-08-15 21:21     ` Sebastian Herbszt
  2009-08-15 23:17       ` Anthony Liguori
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Herbszt @ 2009-08-15 21:21 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Hans de Bruin, qemu-devel

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];

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure
  2009-08-10 21:50 ` Anthony Liguori
  2009-08-10 22:00   ` Sebastian Herbszt
@ 2009-08-15 21:32   ` Sebastian Herbszt
  1 sibling, 0 replies; 6+ messages in thread
From: Sebastian Herbszt @ 2009-08-15 21:32 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

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

Also happens on mingw:

  CC    i386-softmmu/pci-hotplug.o
v0.11.0-rc0-366-gcfa9051/hw/pci-hotplug.c: In function `pci_device_hot_add':
v0.11.0-rc0-366-gcfa9051/hw/pci-hotplug.c:102: warning: 'dinfo' might be used uninitialized in this function
 
> What version of gcc?

gcc version 3.4.5 (mingw32 special)

- Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure
  2009-08-15 21:21     ` [Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure Sebastian Herbszt
@ 2009-08-15 23:17       ` Anthony Liguori
  0 siblings, 0 replies; 6+ messages in thread
From: Anthony Liguori @ 2009-08-15 23:17 UTC (permalink / raw)
  To: Sebastian Herbszt; +Cc: Hans de Bruin, qemu-devel

Sebastian Herbszt wrote:
>
> Anthony, there is a second report [1] about this problem. The 
> following patch makes
> the compiler happy.

Please post as a top level patch with a Signed-off-by.

Regards,

Anthony Liguori

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-08-15 23:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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     ` [Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure Sebastian Herbszt
2009-08-15 23:17       ` Anthony Liguori
2009-08-15 21:32   ` [Qemu-devel] v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure Sebastian Herbszt

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).