Re: [PATCH 1/4] C: s/0/NULL/ for pointer type
- From
Danh Doan <congdanhqx@gmail.com>
- Date
- Apr 24, 2020, 01:09 UTC
- Message-ID
- <20200424010924.GF1949@danh.dev>
- In-Reply-To
- <xmqqd07xem9l.fsf@gitster.c.googlers.com>
On 2020-04-23 17:54:30-0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
>
> > Actually, I have a patch somewhere which suppressed the sparse warning
> > for the '= { 0 }' token sequence used in these initializations. However,
> > I don't seem to be able to find them at the moment! :(
>
> AHHHHHhhhhhhhh.
>
> Thanks for reminding. Yeah, I recall that the concensus of those
> who were vocal in that old discussion [*1*] was that "= { 0 }"
> should be taken as an idiom and should not be subject to s/0/NULL/
> conversion.So, to follow that idiom, this patch should be changed, too? https://lore.kernel.org/git/nycvar.QRO.7.76.6.2004101604210.46@tvgsbejvaqbjf.bet/
+Cc: Dscho and Han-Wen
Show 10 quoted lines
> > [Luc, this topic came up on the sparse and kernel mailing-lists at one > > point, but I didn't get around to posting my patch to the list - something > > came up. Hopefully, I will find some time to find it and post it soon.] > > > [References] > > *1* > > https://lore.kernel.org/git/e6796c60-a870-e761-3b07-b680f934c537@ramsayjones.plus.com/
-- Danh