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>
This commit is contained in:
Ramsay Jones
2008-07-03 16:52:09 +01:00
committed by Junio C Hamano
parent db5d6666af
commit 6e1c23442a
9 changed files with 32 additions and 21 deletions

View File

@ -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)