[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <04133DCF-C237-45D2-8AEB-199A42EBCCDE@intel.com>
Date: Fri, 26 Sep 2014 21:07:25 +0000
From: "Rustad, Mark D" <mark.d.rustad@...el.com>
To: "josh@...htriplett.org" <josh@...htriplett.org>
CC: Geert Uytterhoeven <geert@...ux-m68k.org>,
"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>,
Borislav Petkov <bp@...en8.de>,
"sparse@...isli.org" <sparse@...isli.org>,
"linux-sparse@...r.kernel.org" <linux-sparse@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/7] Silence even more W=2 warnings
On Sep 26, 2014, at 12:58 PM, <josh@...htriplett.org> <josh@...htriplett.org> wrote:
> On Fri, Sep 26, 2014 at 07:37:19PM +0000, Rustad, Mark D wrote:
>> Most of the others come from null-entry table initializations, i.e. {
>> 0 }, which give missing field initializer warnings.
>
> I'd suggest that such initializers should just be {}, not { 0 }, and we
> should teach compilers to specifically *not* complain about empty
> initializers even when otherwise complaining about missing fields.
> Initializing a structure to 0 is completely sensible.
I agree completely! But of course that isn't how it is now. I guess I have spent too many years stuck on a single version of gcc that I tend not to think of changing the compiler readily enough. At least now I can upgrade the compiler freely.
Made me go check to be sure. Indeed even { } still throws the missing-initializers warning with gcc 4.8.3.
--
Mark Rustad, Networking Division, Intel Corporation
Download attachment "signature.asc" of type "application/pgp-signature" (842 bytes)
Powered by blists - more mailing lists