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 /builtin-fetch-pack.c | |
parent | db5d6666afb9f315f9c9ac74a5d638f07cf9cbe0 (diff) | |
download | git-6e1c23442a0315ad440bb8457703dcf1ad943b96.tar.gz |
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-fetch-pack.c')
-rw-r--r-- | builtin-fetch-pack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 2175c6d0d6..1ea7040639 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -520,7 +520,8 @@ static int get_pack(int xd[2], char **pack_lockfile) if (read_pack_header(demux.out, &header)) die("protocol error: bad pack header"); - snprintf(hdr_arg, sizeof(hdr_arg), "--pack_header=%u,%u", + snprintf(hdr_arg, sizeof(hdr_arg), + "--pack_header=%"PRIu32",%"PRIu32, ntohl(header.hdr_version), ntohl(header.hdr_entries)); if (ntohl(header.hdr_entries) < unpack_limit) do_keep = 0; |