From ab59d3895bd2ea604aa336d2cd38aa374e43ed44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Thu, 22 Feb 2018 09:19:51 +0000 Subject: [PATCH] bhyve: add missing cases for graphics listen type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address warning from -Wswitch-enum by adding missing cases for graphics listen types that are not supported. Signed-off-by: Daniel P. Berrangé --- 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 fd738b42c9..5e309c3a29 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) -- GitLab