From 6e1c23442a0315ad440bb8457703dcf1ad943b96 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Thu, 3 Jul 2008 16:52:09 +0100 Subject: Fix some warnings (on cygwin) to allow -Werror When printing valuds of type uint32_t, we should use PRIu32, and should not assume that it is unsigned int. On 32-bit platforms, it could be defined as unsigned long. The same caution applies to ntohl(). Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- builtin-verify-pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin-verify-pack.c') diff --git a/builtin-verify-pack.c b/builtin-verify-pack.c index 222c39e7ed..f4ac595695 100644 --- a/builtin-verify-pack.c +++ b/builtin-verify-pack.c @@ -46,11 +46,11 @@ static void show_pack_info(struct packed_git *p) for (i = 0; i <= MAX_CHAIN; i++) { if (!chain_histogram[i]) continue; - printf("chain length = %d: %d object%s\n", i, + printf("chain length = %"PRIu32": %"PRIu32" object%s\n", i, chain_histogram[i], chain_histogram[i] > 1 ? "s" : ""); } if (chain_histogram[0]) - printf("chain length > %d: %d object%s\n", MAX_CHAIN, + printf("chain length > %d: %"PRIu32" object%s\n", MAX_CHAIN, chain_histogram[0], chain_histogram[0] > 1 ? "s" : ""); } -- cgit v1.2.1