Re: Fixing the warning about warning(""); was: Re: [PATCH] difftool.c: mark a file-local symbol with static
- From
Jeff King <peff@peff.net>
- Date
- Jan 26, 2017, 14:35 UTC
- Message-ID
- <20170126143534.mekszrwxnytadwyo@sigill.intra.peff.net>
- In-Reply-To
- <alpine.DEB.2.20.1701261226220.3469@virtualbox>
On Thu, Jan 26, 2017 at 12:37:46PM +0100, Johannes Schindelin wrote:
Show 13 quoted lines
> > Am 25.01.2017 um 23:01 schrieb Jeff King:
> > > +#pragma GCC diagnostic ignored "-Wformat-zero-length"
> >
> > Last time I used #pragma GCC in a cross-platform project, it triggered
> > an "unknown pragma" warning for MSVC.
>
> It is starting to become a little funny how many ways we can discuss the
> resolution of the GCC compiler warning.
>
> And it starts to show: we try to solve the thing in so many ways, just to
> avoid the obviously most-trivial patch to change warning(""); to
> warning("%s", "") (the change to warning(" "); would change behavior, but
> I would be fine with that, too).The point is that the trivial patch fixes _this_ case, but does not prevent the discussion from happening again later. They are two separate problems. I am OK not solving the latter one and relying on review (as I've already said), but the solutions do not do the same thing.
-Peff