valgrind/i386: avoid false positives on KVM_SET_PIT ioctl
authorChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 14 Oct 2014 09:58:34 +0000 (11:58 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 15 Dec 2014 11:21:01 +0000 (12:21 +0100)
struct kvm_pit_state2 contains pad fields. Let's use a designated
initializer to avoid false positives from valgrind/memcheck.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/kvm/i8254.c

index 472af811cdff4d5439a5568b2ff73b74863c32df..90eea10df75fce80b0c11c06ae1054ab8109925f 100644 (file)
@@ -138,7 +138,7 @@ static void kvm_pit_get(PITCommonState *pit)
 static void kvm_pit_put(PITCommonState *pit)
 {
     KVMPITState *s = KVM_PIT(pit);
-    struct kvm_pit_state2 kpit;
+    struct kvm_pit_state2 kpit = {};
     struct kvm_pit_channel_state *kchan;
     struct PITChannelState *sc;
     int i, ret;