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 <herbszt@gmx.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
master
Sebastian Herbszt 2009-08-16 14:07:54 +02:00 committed by Anthony Liguori
parent 6eea90eba4
commit 06c79f4ebd
1 changed files with 1 additions and 1 deletions

View File

@ -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];