mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
virt-host-validate: fix build with clang
Building with clang 3.8 triggers the following error: CC virt_host_validate-virt-host-validate-qemu.o virt-host-validate-qemu.c:36:11: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] char *kvmhint = _("Check that CPU and firmware supports virtualization " ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ virt-host-validate-qemu.c:46:17: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] kvmhint = _("Check that the 'kvm-intel' or 'kvm-amd' modules are " ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. Fix by using 'const' for kvmhint declaration.
This commit is contained in:
parent
00bcb45d8d
commit
b63c7a0b39
@ -33,8 +33,8 @@ int virHostValidateQEMU(void)
|
||||
int ret = 0;
|
||||
bool hasHwVirt = false;
|
||||
bool hasVirtFlag = false;
|
||||
char *kvmhint = _("Check that CPU and firmware supports virtualization "
|
||||
"and kvm module is loaded");
|
||||
const char *kvmhint = _("Check that CPU and firmware supports virtualization "
|
||||
"and kvm module is loaded");
|
||||
|
||||
if (!(flags = virHostValidateGetCPUFlags()))
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user