Subject: Re: Cygwin and git 1.5.1

From: "H. Peter Anvin" <[email-masked]>
Date: Tue, 10 Apr 2007 15:44:29 -0700

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