All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pci-hotplug: initialize dinfo to NULL in pci_device_hot_add
@ 2009-08-16 12:07 Sebastian Herbszt
  2009-08-21 19:09 ` [Qemu-devel] Re: [PATCH] pci-hotplug: initialize dinfo to NULL inpci_device_hot_add Sebastian Herbszt
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Herbszt @ 2009-08-16 12:07 UTC (permalink / raw)
  To: qemu-devel

Suppress the following compiler warning emitted by at least gcc version 4.2.1 (SUSE Linux)
and gcc version 3.4.5 (mingw32 special):

hw/pci-hotplug.c: In function 'pci_device_hot_add':
hw/pci-hotplug.c:102: warning: 'dinfo' may be used uninitialized in this function
hw/pci-hotplug.c:102: note: 'dinfo' was declared here

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>

--- 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] 2+ messages in thread

* [Qemu-devel] Re: [PATCH] pci-hotplug: initialize dinfo to NULL inpci_device_hot_add
  2009-08-16 12:07 [Qemu-devel] [PATCH] pci-hotplug: initialize dinfo to NULL in pci_device_hot_add Sebastian Herbszt
@ 2009-08-21 19:09 ` Sebastian Herbszt
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Herbszt @ 2009-08-21 19:09 UTC (permalink / raw)
  To: qemu-devel, Anthony Liguori

Sebastian Herbszt wrote:
> Suppress the following compiler warning emitted by at least gcc version 4.2.1 (SUSE Linux)
> and gcc version 3.4.5 (mingw32 special):
> 
> hw/pci-hotplug.c: In function 'pci_device_hot_add':
> hw/pci-hotplug.c:102: warning: 'dinfo' may be used uninitialized in this function
> hw/pci-hotplug.c:102: note: 'dinfo' was declared here

Still needed for v0.11.0-rc0-373-g6b74327.

- Sebastian

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

end of thread, other threads:[~2009-08-21 19:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-16 12:07 [Qemu-devel] [PATCH] pci-hotplug: initialize dinfo to NULL in pci_device_hot_add Sebastian Herbszt
2009-08-21 19:09 ` [Qemu-devel] Re: [PATCH] pci-hotplug: initialize dinfo to NULL inpci_device_hot_add Sebastian Herbszt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.