git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] difftool.c: mark a file-local symbol with static

From
Jeff King <peff@peff.net>
Date
Jan 24, 2017, 14:23 UTC
Message-ID
<20170124142346.u3d7l6772mtkgpcf@sigill.intra.peff.net>
In-Reply-To
<20170122052608.tpr5pihfgafhoynj@gmail.com>
mn Sat, Jan 21, 2017 at 09:26:08PM -0800, David Aguilar wrote:
Show 16 quoted lines
> > > An obvious second
> > > best option would be to drop -Wall from the "everybody" CFLAGS and
> > > move it to DEVELOPER_CFLAGS instead.
> > 
> > Yeah, though that doesn't help the example above.
> > 
> > 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.

The problematic code just hit 'next', so I suppose we'll see soon (OTOH, the real test is when it get shipped as part of a release).

-Peff
Previous: David AguilarNext: Junio C Hamano
Message 14 of 28 in “difftool.c: mark a file-local symbol with static”
  1. difftool.c: mark a file-local symbol with staticRamsay Jones, Nov 29, 2016
  2. Johannes SchindelinNov 30, 2016
  3. Ramsay JonesNov 30, 2016
  4. Junio C HamanoNov 30, 2016
  5. Jeff KingNov 30, 2016
  6. Ramsay JonesNov 30, 2016
  7. Jeff KingNov 30, 2016
  8. Junio C HamanoNov 30, 2016
  9. Ramsay JonesDec 1, 2016
  10. Jeff KingDec 1, 2016
  11. Junio C HamanoDec 1, 2016
  12. Jeff KingDec 1, 2016
  13. David AguilarJan 22, 2017
  14. Jeff KingJan 24, 2017
  15. Junio C HamanoJan 24, 2017
  16. Jeff KingJan 24, 2017
  17. Fixing the warning about warning(""); was: Re: [PATCH] difftool.c: mark a file-local symbol with staticJohannes Schindelin, Jan 25, 2017
  18. Jeff KingJan 25, 2017
  19. Junio C HamanoJan 25, 2017
  20. Jeff KingJan 25, 2017
  21. Johannes SixtJan 26, 2017
  22. Johannes SchindelinJan 26, 2017
  23. Jeff KingJan 26, 2017
  24. Jeff KingJan 26, 2017
  25. Junio C HamanoJan 26, 2017
  26. Johannes SchindelinJan 26, 2017
  27. Jeff KingJan 26, 2017
  28. Johannes SchindelinJan 26, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.