On Sat, 18 Oct 2014 17:39:10 -0700 [email protected] (Eric W. Biederman) 
wrote:

> Jeff Kirsher <[email protected]> writes:
> 
> > From: Mark Rustad <[email protected]>
> >
> > Resolve missing-field-initializers warnings in W=2 builds by
> > using designated initialization.
> 
> ick.  No.
> 
> That gcc warning makes no sense.  In this case heeding it makes the code
> significantly uglier and significantly more confusing.
> 

Yeah, it's not pretty.

> > --- a/kernel/sysctl.c
> > +++ b/kernel/sysctl.c
> > @@ -257,7 +257,7 @@ static struct ctl_table sysctl_base_table[] = {
> >             .mode           = 0555,
> >             .child          = dev_table,
> >     },
> > -   { }
> > +   { .procname = NULL }
> >  };

We use { } to mean "all zero" in 12 squillion places.  Do they all warn
or is there something special about this site?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to