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 /index-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 'index-pack.c')
-rw-r--r-- | index-pack.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/index-pack.c b/index-pack.c index 5ac91baf98..25db5db24b 100644 --- a/index-pack.c +++ b/index-pack.c @@ -190,7 +190,8 @@ static void parse_pack_header(void) if (hdr->hdr_signature != htonl(PACK_SIGNATURE)) die("pack signature mismatch"); if (!pack_version_ok(hdr->hdr_version)) - die("pack version %d unsupported", ntohl(hdr->hdr_version)); + die("pack version %"PRIu32" unsupported", + ntohl(hdr->hdr_version)); nr_objects = ntohl(hdr->hdr_entries); use(sizeof(struct pack_header)); @@ -771,7 +772,8 @@ static int git_index_pack_config(const char *k, const char *v, void *cb) if (!strcmp(k, "pack.indexversion")) { pack_idx_default_version = git_config_int(k, v); if (pack_idx_default_version > 2) - die("bad pack.indexversion=%d", pack_idx_default_version); + die("bad pack.indexversion=%"PRIu32, + pack_idx_default_version); return 0; } return git_default_config(k, v, cb); |