Commit deb057f added a switch without a default case.
Add it and call virReportEnumRangeError for _LAST too.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
---
src/conf/domain_conf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index bde9fef914..8cb28a0880 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -5760,7 +5760,6 @@ virDomainInputDefValidate(const virDomainInputDef *input)
case VIR_DOMAIN_INPUT_TYPE_MOUSE:
case VIR_DOMAIN_INPUT_TYPE_TABLET:
case VIR_DOMAIN_INPUT_TYPE_KBD:
- case VIR_DOMAIN_INPUT_TYPE_LAST:
if (input->source.evdev) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("setting source evdev path only supported for
"
@@ -5771,6 +5770,11 @@ virDomainInputDefValidate(const virDomainInputDef *input)
case VIR_DOMAIN_INPUT_TYPE_PASSTHROUGH:
break;
+
+ case VIR_DOMAIN_INPUT_TYPE_LAST:
+ default:
+ virReportEnumRangeError(virDomainInputType, input->type);
+ return -1;
}
return 0;
--
2.16.4