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-unpack-objects.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builtin-unpack-objects.c') diff --git a/builtin-unpack-objects.c b/builtin-unpack-objects.c index 85043d1fde..a891866665 100644 --- a/builtin-unpack-objects.c +++ b/builtin-unpack-objects.c @@ -471,7 +471,8 @@ static void unpack_all(void) if (ntohl(hdr->hdr_signature) != PACK_SIGNATURE) die("bad pack file"); if (!pack_version_ok(hdr->hdr_version)) - die("unknown pack file version %d", ntohl(hdr->hdr_version)); + die("unknown pack file version %"PRIu32, + ntohl(hdr->hdr_version)); use(sizeof(struct pack_header)); if (!quiet) -- cgit v1.2.1