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! ;-)
All the best,
Ramsay Jones
--- >8 ---
From b2610fc65e42cd6a9acadb20343bddee7c1e3cec Mon Sep 17 00:00:00 2001
From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date: Mon, 9 Apr 2007 16:41:43 +0100
Subject: [PATCH] Fix some "printf format" warnings.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
builtin-ls-files.c | 2 +-
builtin-pack-objects.c | 20 ++++++++++----------
builtin-unpack-objects.c | 2 +-
fetch-pack.c | 2 +-
index-pack.c | 2 +-
merge-index.c | 2 +-
pack-check.c | 2 +-
read-cache.c | 2 +-
receive-pack.c | 2 +-
sha1_file.c | 6 +++---
unpack-trees.c | 2 +-
11 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/builtin-ls-files.c b/builtin-ls-files.c
index 4e1d5af..310952a 100644
--- a/builtin-ls-files.c
+++ b/builtin-ls-files.c
@@ -193,7 +193,7 @@ static void show_ce_entry(const char *tag, struct cache_entry *ce)
putchar(line_terminator);
}
else {
- printf("%s%06o %s %d\t",
+ printf("%s%06lo %s %d\t",
tag,
ntohl(ce->ce_mode),
abbrev ? ...