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-fetch-pack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builtin-fetch-pack.c') diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 2175c6d0d..1ea704063 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; -- cgit v1.2.1