From: John Ferlan Date: Fri, 1 Dec 2017 13:51:05 +0000 (-0500) Subject: qemu: Use virDomainControllerType in qemuBuildControllerDevStr switch X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cc9d2724782b34aca8e9818cc3966747bd7ffa35;p=libvirt.git qemu: Use virDomainControllerType in qemuBuildControllerDevStr switch Make sure all types of virDomainControllerType are handled in the switch statement. --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6a8da1d586..645802795d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2695,7 +2695,7 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, } } - switch (def->type) { + switch ((virDomainControllerType) def->type) { case VIR_DOMAIN_CONTROLLER_TYPE_SCSI: switch (model) { case VIR_DOMAIN_CONTROLLER_MODEL_SCSI_VIRTIO_SCSI: @@ -3140,7 +3140,8 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, "this QEMU binary or machine type")); goto error; - default: + case VIR_DOMAIN_CONTROLLER_TYPE_FDC: + case VIR_DOMAIN_CONTROLLER_TYPE_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Unsupported controller type: %s"), virDomainControllerTypeToString(def->type));