From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36473) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrZMU-00089O-9a for qemu-devel@nongnu.org; Thu, 20 Nov 2014 16:34:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrZML-0000Oi-3X for qemu-devel@nongnu.org; Thu, 20 Nov 2014 16:33:58 -0500 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:50431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrZMK-0000OB-PR for qemu-devel@nongnu.org; Thu, 20 Nov 2014 16:33:49 -0500 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 20 Nov 2014 21:33:47 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 93D3F1B08051 for ; Thu, 20 Nov 2014 21:33:57 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sAKLXiZ47143800 for ; Thu, 20 Nov 2014 21:33:44 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sAKLXiLE015525 for ; Thu, 20 Nov 2014 14:33:44 -0700 From: Christian Borntraeger Date: Thu, 20 Nov 2014 22:33:34 +0100 Message-Id: <1416519221-22299-3-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1416519221-22299-1-git-send-email-borntraeger@de.ibm.com> References: <1416519221-22299-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 2/9] valgrind/i386: avoid false positives on KVM_SET_CLOCK ioctl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Peter Maydell Cc: Christian Borntraeger , qemu-devel kvm_clock_data contains pad fields. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger --- hw/i386/kvm/clock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/i386/kvm/clock.c b/hw/i386/kvm/clock.c index 58be2bd..efdf165 100644 --- a/hw/i386/kvm/clock.c +++ b/hw/i386/kvm/clock.c @@ -88,7 +88,7 @@ static void kvmclock_vm_state_change(void *opaque, int running, int ret; if (running) { - struct kvm_clock_data data; + struct kvm_clock_data data = {}; uint64_t time_at_migration = kvmclock_current_nsec(s); s->clock_valid = false; @@ -99,7 +99,6 @@ static void kvmclock_vm_state_change(void *opaque, int running, } data.clock = s->clock; - data.flags = 0; ret = kvm_vm_ioctl(kvm_state, KVM_SET_CLOCK, &data); if (ret < 0) { fprintf(stderr, "KVM_SET_CLOCK failed: %s\n", strerror(ret)); -- 1.9.3