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 /receive-pack.c | |
parent | db5d6666afb9f315f9c9ac74a5d638f07cf9cbe0 (diff) | |
download | git-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 'receive-pack.c')
-rw-r--r-- | receive-pack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/receive-pack.c b/receive-pack.c index b26f2e3a4..fa653b49f 100644 --- a/receive-pack.c +++ b/receive-pack.c @@ -370,7 +370,8 @@ static const char *unpack(void) hdr_err = parse_pack_header(&hdr); if (hdr_err) return hdr_err; - snprintf(hdr_arg, sizeof(hdr_arg), "--pack_header=%u,%u", + snprintf(hdr_arg, sizeof(hdr_arg), + "--pack_header=%"PRIu32",%"PRIu32, ntohl(hdr.hdr_version), ntohl(hdr.hdr_entries)); if (ntohl(hdr.hdr_entries) < unpack_limit) { |