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 --- show-index.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'show-index.c') diff --git a/show-index.c b/show-index.c index 7253991fff..45bb535773 100644 --- a/show-index.c +++ b/show-index.c @@ -68,7 +68,8 @@ int main(int argc, char **argv) ntohl(off64[1]); off64_nr++; } - printf("%" PRIuMAX " %s (%08x)\n", (uintmax_t) offset, + printf("%" PRIuMAX " %s (%08"PRIx32")\n", + (uintmax_t) offset, sha1_to_hex(entries[i].sha1), ntohl(entries[i].crc)); } -- cgit v1.2.1