Re: [PATCH v2 2/5] *.[ch] *_INIT macros: use { 0 } for a "zero out" idiom
- From
Jeff King <peff@peff.net>
- Date
- Sep 28, 2021, 00:46 UTC
- Message-ID
- <YVJl2OPT9RRVEpQa@coredump.intra.peff.net>
- In-Reply-To
- <87h7e5zgjw.fsf@evledraar.gmail.com>
On Tue, Sep 28, 2021 at 02:25:16AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 19 quoted lines
> It seems like we should just revert 1c96642326, looking at the history
> of sparse.git there's:
>
> - 537e3e2d (univ-init: conditionally accept { 0 } without warnings, 2020-05-18)
>
> Followed by git.git's 1c96642326 a few days later, but then in sparse.git:
>
> - 41f651b4 (univ-init: set default to -Wno-universal-initializer, 2020-05-29)
>
> I.e. a few days after the workaround in git.git the upstream repo
> changed the default. The 537e3e2d isn't in any release of sparse that
> 41f651b4 isn't in, they both first appeared in v0.6.2.
>
> So us having -Wno-universal-initializer only seems useful if you're
> using some old commit in sparse.git.
>
> Having written the above I found
> https://lore.kernel.org/git/20200530162432.a7fitzjc53hsn2ej@ltop.local/;
> i.e. sparse's maintainer pretty much saying the same thing.Yeah, that seems reasonable. If somebody has an old version of sparse they'll presumably see actual "don't use 0 to initialize a pointer" warnings, as opposed to "hey, I don't understand -Wno-universal-initializer". But either way, they should upgrade.
-Peff