[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [COMMIT 7432ff5] Rearrange to suppress gcc 3.3.5 warning
From: |
Anthony Liguori |
Subject: |
[Qemu-commits] [COMMIT 7432ff5] Rearrange to suppress gcc 3.3.5 warning about unusedvariable |
Date: |
Sun, 23 Aug 2009 06:16:32 -0000 |
From: Blue Swirl <address@hidden>
Signed-off-by: Blue Swirl <address@hidden>
diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c
index 4da916c..1f92e09 100644
--- a/hw/pci-hotplug.c
+++ b/hw/pci-hotplug.c
@@ -125,9 +125,8 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
monitor_printf(mon, "Parameter addr not supported\n");
return NULL;
}
- } else if (type == IF_VIRTIO) {
- monitor_printf(mon, "virtio requires a backing file/device.\n");
- return NULL;
+ } else {
+ dinfo = NULL;
}
switch (type) {
@@ -135,6 +134,10 @@ static PCIDevice *qemu_pci_hot_add_storage(Monitor *mon,
dev = pci_create("lsi53c895a", devaddr);
break;
case IF_VIRTIO:
+ if (!dinfo) {
+ monitor_printf(mon, "virtio requires a backing file/device.\n");
+ return NULL;
+ }
dev = pci_create("virtio-blk-pci", devaddr);
qdev_prop_set_drive(&dev->qdev, "drive", dinfo);
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [COMMIT 7432ff5] Rearrange to suppress gcc 3.3.5 warning about unusedvariable,
Anthony Liguori <=