From e694adf8ca1b9d1e50014c50ae31642103af2cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 14 Feb 2018 09:43:59 +0000 Subject: [PATCH] tools: handle missing switch enum cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cast away enum type in places where we don't wish to cover all cases. Reviewed-by: John Ferlan Signed-off-by: Daniel P. Berrangé --- tools/virt-host-validate-qemu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/virt-host-validate-qemu.c b/tools/virt-host-validate-qemu.c index 2aa396e3ab..d7573ea8b3 100644 --- a/tools/virt-host-validate-qemu.c +++ b/tools/virt-host-validate-qemu.c @@ -33,13 +33,14 @@ int virHostValidateQEMU(void) int ret = 0; bool hasHwVirt = false; bool hasVirtFlag = false; + virArch arch = virArchFromHost(); const char *kvmhint = _("Check that CPU and firmware supports virtualization " "and kvm module is loaded"); if (!(flags = virHostValidateGetCPUFlags())) return -1; - switch (virArchFromHost()) { + switch ((int)arch) { case VIR_ARCH_I686: case VIR_ARCH_X86_64: hasVirtFlag = true; -- GitLab