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

Re: Cygwin and git 1.5.1

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Apr 10, 2007, 22:44 UTC
Message-ID
<461C134D.8020803@zytor.com>
In-Reply-To
<461BCBC0.2000705@ramsay1.demon.co.uk>
Ramsay Jones wrote:
Show 17 quoted lines
> Hi Junio,
> 
> I recently upgraded to 1.5.1, via tarball as usual, without much problem.
> The only problem being the "printf format warnings" issue, which prevents
> me building with -Werror.
> 
> I have included, below, an updated version of my patch from the 1.5.0 
> series.
> We agreed last time that this patch is not the correct solution to this
> problem in general (but it works on cygwin!), so this is *not* intended
> for submission. I just wanted to document the problem. As before, I don't
> really have a solution; I suppose I will just have to carry this patch
> forward with each release - no big deal.
> 
> Note that the patch has grown larger. This is due to the increased use of
> uint32_t (in combination with printf/die/error etc).
> I guess not many others use -Werror to build on cygwin! ;-)

The excruciatingly correct way to do this is to use the macros defined in <inttypes.h>, so for uint32_t one should use %"PRNu32" instead of %u, for example.

	-hpa
Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 4 in “Cygwin and git 1.5.1”
  1. Ramsay JonesApr 10, 2007
  2. H. Peter AnvinApr 10, 2007
  3. Ramsay JonesApr 14, 2007
  4. H. Peter AnvinApr 14, 2007

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.