Switch is used for just one case, but a more future proof
approach is to handle all enum values.
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
---
src/conf/domain_conf.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b903dac1cb..41eb105a6c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2904,7 +2904,7 @@ void virDomainChrDefFree(virDomainChrDef *def)
if (!def)
return;
- switch (def->deviceType) {
+ switch ((virDomainChrDeviceType)def->deviceType) {
case VIR_DOMAIN_CHR_DEVICE_TYPE_CHANNEL:
switch (def->targetType) {
case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD:
@@ -2918,7 +2918,10 @@ void virDomainChrDefFree(virDomainChrDef *def)
}
break;
- default:
+ case VIR_DOMAIN_CHR_DEVICE_TYPE_PARALLEL:
+ case VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL:
+ case VIR_DOMAIN_CHR_DEVICE_TYPE_CONSOLE:
+ case VIR_DOMAIN_CHR_DEVICE_TYPE_LAST:
break;
}
--
2.35.3