Messages in this thread |  | | Date | Tue, 21 Oct 2014 12:07:11 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] kernel/sysctl: Resolve missing-field-initializers warnings |
| |
On Sat, 18 Oct 2014 17:39:10 -0700 ebiederm@xmission.com (Eric W. Biederman) wrote:
> Jeff Kirsher <jeffrey.t.kirsher@intel.com> writes: > > > From: Mark Rustad <mark.d.rustad@intel.com> > > > > 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?
|  |