KVM: selftests: Compile code with warnings enabled
authorThomas Huth <thuth@redhat.com>
Fri, 17 May 2019 09:04:45 +0000 (11:04 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 24 May 2019 19:27:05 +0000 (21:27 +0200)
commit319f6f97e3a16c38795168753db8740f77b156c9
tree3564c1a1f09ab711948d3f44fc1f94ed14174e7f
parent3b339e2527a6db257fa8f2a4cab3c510432a98d5
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>
12 files changed:
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/dirty_log_test.c
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c
tools/testing/selftests/kvm/x86_64/evmcs_test.c
tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c
tools/testing/selftests/kvm/x86_64/platform_info_test.c
tools/testing/selftests/kvm/x86_64/smm_test.c
tools/testing/selftests/kvm/x86_64/state_test.c
tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c
tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c