From: Daniel P. Berrangé Date: Thu, 22 Feb 2018 09:19:51 +0000 (+0000) Subject: bhyve: add missing cases for graphics listen type X-Git-Tag: v4.1.0-rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab59d3895bd2ea604aa336d2cd38aa374e43ed44;p=thirdparty%2Flibvirt.git bhyve: add missing cases for graphics listen type Address warning from -Wswitch-enum by adding missing cases for graphics listen types that are not supported. Signed-off-by: Daniel P. Berrangé --- 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)