From: Peter Krempa Date: Tue, 2 Feb 2016 08:43:36 +0000 (+0100) Subject: qemu: hotplug: Use typecasted switch X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f8fee9337b33ac0e9da56fb50e1adf5b8894f9ef;p=libvirt.git qemu: hotplug: Use typecasted switch Remove the default case since all cases are covered. --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index f8db960e04..b456fedd5a 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; }