aboutsummaryrefslogtreecommitdiff
path: root/builtin-unpack-objects.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2008-07-03 16:52:09 +0100
committerJunio C Hamano <gitster@pobox.com>2008-07-05 17:26:29 -0700
commit6e1c23442a0315ad440bb8457703dcf1ad943b96 (patch)
tree029bfdb329dfdaeb8a85787c6548fbf06d191b78 /builtin-unpack-objects.c
parentdb5d6666afb9f315f9c9ac74a5d638f07cf9cbe0 (diff)
downloadgit-6e1c23442a0315ad440bb8457703dcf1ad943b96.tar.gz
git-6e1c23442a0315ad440bb8457703dcf1ad943b96.tar.xz
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-unpack-objects.c')
-rw-r--r--builtin-unpack-objects.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-unpack-objects.c b/builtin-unpack-objects.c
index 85043d1fd..a89186666 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)