Skip to contentSkip to conversation

v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure

Qemu-devel Sebastian Herbszt 2 participants 6 messages Aug 10, 2009 – Aug 15, 2009

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 7 lines · Sebastian Herbszt

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

#2 lore raw
Quoted 10 lines · Anthony Liguori
Quoted 7 lines · Sebastian Herbszt

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)

Quoted 1 line

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

- Sebastian

#3 lore raw

[Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure

Quoted 10 lines · Sebastian Herbszt
Quoted 9 lines · Anthony Liguori
Quoted 7 lines · Sebastian Herbszt

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

Quoted 5 lines
Quoted 1 line

What version of gcc?

gcc version 4.2.1 (SUSE Linux)

Quoted 1 line

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

hw/pci-hotplug.c +0 -0
@@ -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];
#4 lore raw

[Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure

Quoted 3 lines · Sebastian Herbszt

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

#5 lore raw
In reply to Anthony Liguori
Quoted 8 lines · Anthony Liguori
Quoted 7 lines · Sebastian Herbszt

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

Quoted 1 line

What version of gcc?

gcc version 3.4.5 (mingw32 special)

- Sebastian