Linux SPARSE checker discussions
 help / color / mirror / Atom feed
* Re: [PATCH 1/4] C: s/0/NULL/ for pointer type
       [not found]     ` <xmqqd07xem9l.fsf@gitster.c.googlers.com>
@ 2020-05-14 21:37       ` Luc Van Oostenryck
  0 siblings, 0 replies; only message in thread
From: Luc Van Oostenryck @ 2020-05-14 21:37 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Ramsay Jones, Đoàn Trần Công Danh, git,
	linux-sparse

On Thu, Apr 23, 2020 at 05:54:30PM -0700, Junio C Hamano wrote:
> 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.
> 
> > [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/

Sorry for the late reply.

I hadn't seen this old discussion but I vaguely remember 2 emails about
this problem, probaly on lkml, without a real discussion, but where the
opinion was the opposite.

Personally, I prefer '= { }' but yes it's not legit and it seems that
some compilers don't like it. I'll be glad to add an option to Sparse
to shut up the warnings now given by '{ 0 }'.

-- Luc

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-14 21:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1587648870.git.congdanhqx@gmail.com>
     [not found] ` <c4fac2ae9d10bc426cb26e4a102b808549696763.1587648870.git.congdanhqx@gmail.com>
     [not found]   ` <1df91aa4-dda5-64da-6ae3-5d65e50a55c5@ramsayjones.plus.com>
     [not found]     ` <xmqqd07xem9l.fsf@gitster.c.googlers.com>
2020-05-14 21:37       ` [PATCH 1/4] C: s/0/NULL/ for pointer type Luc Van Oostenryck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox