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

Re: Cygwin and git 1.5.1

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Apr 14, 2007, 17:21 UTC
Message-ID
<46210DA4.1090600@ramsay1.demon.co.uk>
In-Reply-To
<461C134D.8020803@zytor.com>
H. Peter Anvin wrote:
Show 25 quoted lines
> Ramsay Jones wrote:
>> 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
> 

Yes, that would work. However, I rejected this solution last time, because I did not want to add a dependency on the C99 header files. Having said that, that ship has probably sailed ... ;-)

Maybe I will rework the patch to see how it looks. (I suspect that, while it will be better than sprinkling casts about the place, it will probably look quite ugly ;-P)

All the best,
Ramsay Jones
Previous: H. Peter AnvinNext: H. Peter Anvin
Message 3 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.