Adding the 'default' case to our enum-typecasted switches is the current
safety trend, so add it here for mdevs too.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
src/qemu/qemu_command.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 78c18440e5..1e5d7f9ccf 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5397,10 +5397,10 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd,
}
break;
case VIR_MDEV_MODEL_TYPE_LAST:
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unexpected vfio type '%d'"),
subsys->u.mdev.model);
+ default:
+ virReportEnumRangeError(virMediatedDeviceModelType,
+ subsys->u.mdev.model);
return -1;
- break;
}
virCommandAddArg(cmd, "-device");
--
2.14.4