summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-05-17 12:04:45 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2019-05-24 22:27:05 +0300
commit319f6f97e3a16c38795168753db8740f77b156c9 (patch)
tree3564c1a1f09ab711948d3f44fc1f94ed14174e7f /tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c
parent3b339e2527a6db257fa8f2a4cab3c510432a98d5 (diff)
downloadlinux-319f6f97e3a16c38795168753db8740f77b156c9.tar.xz
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/vmx_close_while_nested_test.c')
-rw-r--r--tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c b/tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c
index 6edec6fd790b..97182b47b10c 100644
--- a/tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c
+++ b/tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c
@@ -39,8 +39,6 @@ static void l1_guest_code(struct vmx_pages *vmx_pages)
{
#define L2_GUEST_STACK_SIZE 64
unsigned long l2_guest_stack[L2_GUEST_STACK_SIZE];
- uint32_t control;
- uintptr_t save_cr3;
GUEST_ASSERT(prepare_for_vmx_operation(vmx_pages));
GUEST_ASSERT(load_vmcs(vmx_pages));
@@ -55,7 +53,6 @@ static void l1_guest_code(struct vmx_pages *vmx_pages)
int main(int argc, char *argv[])
{
- struct vmx_pages *vmx_pages;
vm_vaddr_t vmx_pages_gva;
struct kvm_cpuid_entry2 *entry = kvm_get_supported_cpuid_entry(1);
@@ -68,7 +65,7 @@ int main(int argc, char *argv[])
vcpu_set_cpuid(vm, VCPU_ID, kvm_get_supported_cpuid());
/* Allocate VMX pages and shared descriptors (vmx_pages). */
- 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 (;;) {