Re: [PATCH] difftool.c: mark a file-local symbol with static
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 24, 2017, 21:52 UTC
- Message-ID
- <xmqqlgu0ceia.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170124142346.u3d7l6772mtkgpcf@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 19 quoted lines
>> > As ugly as warning("%s", "") is, I think it may be the thing that annoys
>> > the smallest number of people.
>> >
>> > -Peff
>>
>> How about using warning(" ") instead?
>>
>> For difftool.c specifically, the following is a fine solution,
>> and doesn't require that we change our warning flags just for
>> this one file.
>
> I dunno. As ugly as the "%s" thing is in the source, at least it doesn't
> change the output. Not that an extra space is the end of the world, but
> it seems like it's letting the problem escape from the source code.
>
> Do people still care about resolving this? -Wno-format-zero-length is in
> the DEVELOPER options. It wasn't clear to me if that was sufficient, or
> if we're going to get a bunch of reports from people that need to be
> directed to the right compiler options.I view both as ugly, but probably "%s", "" is lessor of the two evils.
Perhaps
#define JUST_SHOW_EMPTY_LINE "%s", ""
...
warning(JUST_SHOW_EMPTY_LINE);
...or something silly like that?