mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +00:00
tools: handle missing switch enum cases
Cast away enum type in places where we don't wish to cover all cases. Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
1b6cd76ca2
commit
e694adf8ca
@ -33,13 +33,14 @@ int virHostValidateQEMU(void)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool hasHwVirt = false;
|
bool hasHwVirt = false;
|
||||||
bool hasVirtFlag = false;
|
bool hasVirtFlag = false;
|
||||||
|
virArch arch = virArchFromHost();
|
||||||
const char *kvmhint = _("Check that CPU and firmware supports virtualization "
|
const char *kvmhint = _("Check that CPU and firmware supports virtualization "
|
||||||
"and kvm module is loaded");
|
"and kvm module is loaded");
|
||||||
|
|
||||||
if (!(flags = virHostValidateGetCPUFlags()))
|
if (!(flags = virHostValidateGetCPUFlags()))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
switch (virArchFromHost()) {
|
switch ((int)arch) {
|
||||||
case VIR_ARCH_I686:
|
case VIR_ARCH_I686:
|
||||||
case VIR_ARCH_X86_64:
|
case VIR_ARCH_X86_64:
|
||||||
hasVirtFlag = true;
|
hasVirtFlag = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user