From 876f19c19ed8b03f2e3a257deeb193b63cb75577 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Thu, 14 Oct 2021 16:43:00 +0200 Subject: [PATCH] qemuBuildChrChardevStr: Use proper type for the switch statement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the missing cases. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- src/qemu/qemu_command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 9293a413e6..f97cdc70ab 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5137,7 +5137,7 @@ qemuBuildChrChardevStr(virLogManager *logManager, if (!(charAlias = qemuAliasChardevFromDevAlias(alias))) return NULL; - switch (dev->type) { + switch ((virDomainChrType) dev->type) { case VIR_DOMAIN_CHR_TYPE_NULL: virBufferAsprintf(&buf, "null,id=%s", charAlias); break; @@ -5290,6 +5290,8 @@ qemuBuildChrChardevStr(virLogManager *logManager, dev->data.spiceport.channel); break; + case VIR_DOMAIN_CHR_TYPE_NMDM: + case VIR_DOMAIN_CHR_TYPE_LAST: default: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported chardev '%s'"),