diff options
author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2008-07-03 16:52:09 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-05 17:26:29 -0700 |
commit | 6e1c23442a0315ad440bb8457703dcf1ad943b96 (patch) | |
tree | 029bfdb329dfdaeb8a85787c6548fbf06d191b78 /builtin-verify-pack.c | |
parent | db5d6666afb9f315f9c9ac74a5d638f07cf9cbe0 (diff) | |
download | git-6e1c23442a0315ad440bb8457703dcf1ad943b96.tar.gz |
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 <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-verify-pack.c')
-rw-r--r-- | builtin-verify-pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
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" : ""); } |