From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjm9s-0003OS-Hk for qemu-devel@nongnu.org; Thu, 30 Oct 2014 05:36:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xjm9h-0007Bi-Jk for qemu-devel@nongnu.org; Thu, 30 Oct 2014 05:36:44 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:55812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xjm9h-0007Aa-Ac for qemu-devel@nongnu.org; Thu, 30 Oct 2014 05:36:33 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Oct 2014 09:36:31 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id D8D4C1B0806E for ; Thu, 30 Oct 2014 09:36:31 +0000 (GMT) Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s9U9aSg618743640 for ; Thu, 30 Oct 2014 09:36:28 GMT Received: from d06av11.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s9U9aRIU009182 for ; Thu, 30 Oct 2014 03:36:28 -0600 From: Christian Borntraeger Date: Thu, 30 Oct 2014 10:36:41 +0100 Message-Id: <1414661809-21383-2-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1414661809-21383-1-git-send-email-borntraeger@de.ibm.com> References: <1414661809-21383-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 1/9] valgrind: avoid false positives in KVM_GET_DIRTY_LOG ioctl List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Peter Maydell Cc: Christian Borntraeger , qemu-devel struct kvm_dirty_log contains padding fields that trigger false positives in valgrind. Let's use a designated initializer to avoid false positives from valgrind/memcheck. Signed-off-by: Christian Borntraeger --- kvm-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kvm-all.c b/kvm-all.c index 44a5e72..b951320 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -400,7 +400,7 @@ static int kvm_physical_sync_dirty_bitmap(MemoryRegionSection *section) { KVMState *s = kvm_state; unsigned long size, allocated_size = 0; - KVMDirtyLog d; + KVMDirtyLog d = {}; KVMSlot *mem; int ret = 0; hwaddr start_addr = section->offset_within_address_space; -- 1.9.3