[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea
From: |
malc |
Subject: |
Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy. |
Date: |
Mon, 30 Aug 2010 21:06:40 +0400 (MSD) |
User-agent: |
Alpine 2.00 (LNX 1167 2008-08-23) |
On Mon, 30 Aug 2010, Anthony Liguori wrote:
> On 08/30/2010 10:43 AM, Jes Sorensen wrote:
> > On 08/30/10 17:39, Anthony Liguori wrote:
> >
> > > On 08/30/2010 10:35 AM, address@hidden wrote:
> > >
> > > > From: Jes Sorensen<address@hidden>
> > > >
> > > > This keeps the compiler happy when building with -Wextra while
> > > > effectively generating the same code.
> > > >
> > > > Signed-off-by: Jes Sorensen<address@hidden>
> > > >
> > > >
> > > 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.
> >
>
> No, this is GCC being stupid.
Nonsense, it would have been stupid if it warned without asking for this
warning, this is GCC being intelligent.
[..snip..]
--
mailto:address@hidden
- [Qemu-devel] [PATCH 08/14] Remove unused argument for qcow2_encrypt_sectors(), (continued)
[Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Paolo Bonzini, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Anthony Liguori, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Paolo Bonzini, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Anthony Liguori, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Paolo Bonzini, 2010/08/30
- Re: [Qemu-devel] Re: [PATCH 10/14] Zero json struct with memset() instea of = {} to keep compiler happy., Jes Sorensen, 2010/08/30
[Qemu-devel] [PATCH 11/14] Remove unused function arguments, Jes . Sorensen, 2010/08/30