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/evmcs_test.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/evmcs_test.c')
-rw-r--r-- | tools/testing/selftests/kvm/x86_64/evmcs_test.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/evmcs_test.c b/tools/testing/selftests/kvm/x86_64/evmcs_test.c index 36669684eca5..b38260e29775 100644 --- a/tools/testing/selftests/kvm/x86_64/evmcs_test.c +++ b/tools/testing/selftests/kvm/x86_64/evmcs_test.c @@ -19,8 +19,6 @@ #define VCPU_ID 5 -static bool have_nested_state; - void l2_guest_code(void) { GUEST_SYNC(6); @@ -73,7 +71,6 @@ void guest_code(struct vmx_pages *vmx_pages) int main(int argc, char *argv[]) { - struct vmx_pages *vmx_pages = NULL; vm_vaddr_t vmx_pages_gva = 0; struct kvm_regs regs1, regs2; @@ -88,8 +85,6 @@ int main(int argc, char *argv[]) .args[0] = (unsigned long)&evmcs_ver }; - struct kvm_cpuid_entry2 *entry = kvm_get_supported_cpuid_entry(1); - /* Create VM */ vm = vm_create_default(VCPU_ID, 0, guest_code); @@ -113,7 +108,7 @@ int main(int argc, char *argv[]) vcpu_regs_get(vm, VCPU_ID, ®s1); - vmx_pages = vcpu_alloc_vmx(vm, &vmx_pages_gva); + vcpu_alloc_vmx(vm, &vmx_pages_gva); vcpu_args_set(vm, VCPU_ID, 1, vmx_pages_gva); for (stage = 1;; stage++) { |