From 06c79f4ebdddbb55a27e06818eedc614e0e02815 Mon Sep 17 00:00:00 2001 From: Sebastian Herbszt Date: Sun, 16 Aug 2009 14:07:54 +0200 Subject: [PATCH] pci-hotplug: initialize dinfo to NULL in pci_device_hot_add 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 Signed-off-by: Anthony Liguori --- hw/pci-hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c index 1f92e09f87..26ff808f12 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]; -- 2.11.4.GIT