From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55533 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq71x-0002gC-I3 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:16:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq71D-00026B-M5 for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:15:38 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:53491) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq71D-00025m-HZ for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:15:35 -0400 Received: by qyk31 with SMTP id 31so5413617qyk.4 for ; Mon, 30 Aug 2010 09:15:34 -0700 (PDT) Message-ID: <4C7BD926.3030704@codemonkey.ws> Date: Mon, 30 Aug 2010 11:15:34 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy. References: <1283182547-26116-1-git-send-email-Jes.Sorensen@redhat.com> <1283182547-26116-11-git-send-email-Jes.Sorensen@redhat.com> <4C7BD16F.1030301@redhat.com> In-Reply-To: <4C7BD16F.1030301@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, Jes.Sorensen@redhat.com, qemu-devel@nongnu.org On 08/30/2010 10:42 AM, Paolo Bonzini wrote: > On 08/30/2010 05:35 PM, Jes.Sorensen@redhat.com wrote: >> - JSONParsingState state = {}; >> + JSONParsingState state; >> >> + memset(&state, 0, sizeof(state)); >> state.ap = ap; >> > > JSONParsingState state = { .ap = ap }; > > achieves the same. But the fundamental is, what problem does GCC have with the original? If there isn't a reasonable answer, then I'm inclined to think this warning mode is a waste of time. Regards, Anthony Liguori > Paolo >