On 08/30/10 17:39, Anthony Liguori wrote:
> On 08/30/2010 10:35 AM, jes.soren...@redhat.com wrote:
>> From: Jes Sorensen<jes.soren...@redhat.com>
>>
>> This keeps the compiler happy when building with -Wextra while
>> effectively generating the same code.
>>
>> Signed-off-by: Jes Sorensen<jes.soren...@redhat.com>
>>    
> 
> What's GCC's compliant?

cc1: warnings being treated as errors
qjson.c: In function 'qobject_from_jsonv':
qjson.c:39: error: missing initializer
qjson.c:39: error: (near initialization for 'state.parser')
make: *** [qjson.o] Error 1

We have a lot of these where we try to init a struct element {}.

Yes it's technically legal. However it's painful when you try to apply
more aggressive warning flags looking for real bugs.

I would suggest we modify the coding style to ask people to not init a
struct like this.

Cheers,
Jes

Reply via email to