diff --git a/tools/virt-host-validate-qemu.c b/tools/virt-host-validate-qemu.c index 2aa396e3abe8d733610e77514ee55b0cb66257a3..d7573ea8b3ddee0312ff8764d1984a438ea6bc16 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;