diff options
author | Thomas Huth | 2019-05-17 11:04:45 +0200 |
---|---|---|
committer | Paolo Bonzini | 2019-05-24 21:27:05 +0200 |
commit | 319f6f97e3a16c38795168753db8740f77b156c9 (patch) | |
tree | 3564c1a1f09ab711948d3f44fc1f94ed14174e7f /tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | |
parent | kvm: selftests: avoid type punning (diff) | |
download | kernel-qcow2-linux-319f6f97e3a16c38795168753db8740f77b156c9.tar.gz kernel-qcow2-linux-319f6f97e3a16c38795168753db8740f77b156c9.tar.xz kernel-qcow2-linux-319f6f97e3a16c38795168753db8740f77b156c9.zip |
KVM: selftests: Compile code with warnings enabled
So far the KVM selftests are compiled without any compiler warnings
enabled. That's quite bad, since we miss a lot of possible bugs this
way. Let's enable at least "-Wall" and some other useful warning flags
now, and fix at least the trivial problems in the code (like unused
variables).
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c')
-rw-r--r-- | tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c index 63b9fc3fdfbe..071fe32dc84b 100644 --- a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c +++ b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c @@ -89,7 +89,6 @@ struct kvm_cpuid2 *kvm_get_supported_hv_cpuid(struct kvm_vm *vm) { int nent = 20; /* should be enough */ static struct kvm_cpuid2 *cpuid; - int ret; cpuid = malloc(sizeof(*cpuid) + nent * sizeof(struct kvm_cpuid_entry2)); |