v0.11.0-rc0-347-g562593a - pci-hotplug.c build failure
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
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
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 2What 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
[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];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.ov0.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
[Qemu-devel] Re: v0.11.0-rc0-347-g562593a - pci-hotplug.c buildfailure
In reply to Sebastian HerbsztQuoted 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