Remove the default case since all cases are covered.
---
src/qemu/qemu_hotplug.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index f8db960..b456fed 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -795,7 +795,7 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
if (qemuDomainDetermineDiskChain(driver, vm, disk, false, true) < 0)
goto end;
- switch (disk->device) {
+ switch ((virDomainDiskDevice) disk->device) {
case VIR_DOMAIN_DISK_DEVICE_CDROM:
case VIR_DOMAIN_DISK_DEVICE_FLOPPY:
if (!(orig_disk = virDomainDiskFindByBusAndDst(vm->def,
@@ -837,10 +837,8 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
virDomainDiskBusTypeToString(disk->bus));
}
break;
- default:
- virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
- _("disk device type '%s' cannot be
hotplugged"),
- virDomainDiskDeviceTypeToString(disk->device));
+
+ case VIR_DOMAIN_DISK_DEVICE_LAST:
break;
}
--
2.6.2