Messages in this thread | | | From | (Eric W. Biederman) | Date | Sat, 18 Oct 2014 17:39:10 -0700 | Subject | Re: [PATCH] kernel/sysctl: Resolve missing-field-initializers warnings |
| |
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.
Eric
> Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> > --- > kernel/sysctl.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/kernel/sysctl.c b/kernel/sysctl.c > index 4aada6d..5623845 100644 > --- 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 } > }; > > #ifdef CONFIG_SCHED_DEBUG > @@ -1103,7 +1103,7 @@ static struct ctl_table kern_table[] = { > .proc_handler = proc_dointvec, > }, > #endif > - { } > + { .procname = NULL } > }; > > static struct ctl_table vm_table[] = { > @@ -1485,12 +1485,12 @@ static struct ctl_table vm_table[] = { > .mode = 0644, > .proc_handler = proc_doulongvec_minmax, > }, > - { } > + { .procname = NULL } > }; > > #if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE) > static struct ctl_table binfmt_misc_table[] = { > - { } > + { .procname = NULL } > }; > #endif > > @@ -1658,7 +1658,7 @@ static struct ctl_table fs_table[] = { > .proc_handler = &pipe_proc_fn, > .extra1 = &pipe_min_size, > }, > - { } > + { .procname = NULL } > }; > > static struct ctl_table debug_table[] = { > @@ -1682,11 +1682,11 @@ static struct ctl_table debug_table[] = { > .extra2 = &one, > }, > #endif > - { } > + { .procname = NULL } > }; > > static struct ctl_table dev_table[] = { > - { } > + { .procname = NULL } > }; > > int __init sysctl_init(void)
| |