|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy. |
Date: | Mon, 30 Aug 2010 11:15:34 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6 |
On 08/30/2010 10:42 AM, Paolo Bonzini wrote:
On 08/30/2010 05:35 PM, address@hidden 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
[Prev in Thread] | Current Thread | [Next in Thread] |