Address warning from -Wswitch-enum by adding missing cases
for graphics listen types that are not supported.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
Pushed as a CI build fix
src/bhyve/bhyve_command.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index fd738b42c..5e309c3a2 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -419,9 +419,15 @@ bhyveBuildGraphicsArgStr(const virDomainDef *def,
virBufferAsprintf(&opt, ":%d", graphics->data.vnc.port);
break;
- default:
+ case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_SOCKET:
+ case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_NONE:
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Unsupported listen type"));
+ goto error;
+ case VIR_DOMAIN_GRAPHICS_LISTEN_TYPE_LAST:
+ default:
+ virReportEnumRangeError(virDomainGraphicsListenType, glisten->type);
+ goto error;
}
if (video->driver)
--
2.14.3
Show replies by date