Received: from eggs.gnu.org ([208.118.235.92]:57325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXUdi-0005kr-D0 for qemu-devel@nongnu.org; Thu, 24 May 2012 05:47:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SXUdg-0003A0-Dp for qemu-devel@nongnu.org; Thu, 24 May 2012 05:47:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38101) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SXUdg-000399-60 for qemu-devel@nongnu.org; Thu, 24 May 2012 05:47:24 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4O9lMOs009035 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 24 May 2012 05:47:22 -0400 Date: Thu, 24 May 2012 12:47:17 +0300 From: Alon Levy Message-ID: <20120524094717.GO6105@garlic.tlv.redhat.com> References: <4FBDF65F.8070609@redhat.com> <1337852294-12224-1-git-send-email-alevy@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1337852294-12224-1-git-send-email-alevy@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/4] ui/spice-display.c: add missing initialization for valgrind List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, kraxel@redhat.com On Thu, May 24, 2012 at 12:38:11PM +0300, Alon Levy wrote: > We can't initialize QXLDevSurfaceCreate field by field because it has a > pa hole, and so 4 bytes remain uninitialized when building on x86-64, so > just memset. This was supposed to be in reply to "<4FBDF65F.8070609@redhat.com>", rebased on just pulled master, so should apply cleanly. > > Signed-off-by: Alon Levy > --- > ui/spice-display.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/ui/spice-display.c b/ui/spice-display.c > index 5418eb3..3e8f0b3 100644 > --- a/ui/spice-display.c > +++ b/ui/spice-display.c > @@ -244,6 +244,8 @@ void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd) > { > QXLDevSurfaceCreate surface; > > + memset(&surface, 0, sizeof(surface)); > + > dprint(1, "%s: %dx%d\n", __FUNCTION__, > ds_get_width(ssd->ds), ds_get_height(ssd->ds)); > > -- > 1.7.10.1 > >