qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 06c79f4] pci-hotplug: initialize dinfo to NULL in


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 06c79f4] pci-hotplug: initialize dinfo to NULL inpci_device_hot_add
Date: Fri, 28 Aug 2009 02:19:54 -0000

From: Sebastian Herbszt <address@hidden>

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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 1f92e09..26ff808 100644
--- 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];
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]