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 /show-index.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 'show-index.c')
-rw-r--r-- | show-index.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/show-index.c b/show-index.c index 7253991fff..45bb535773 100644 --- a/show-index.c +++ b/show-index.c @@ -68,7 +68,8 @@ int main(int argc, char **argv) ntohl(off64[1]); off64_nr++; } - printf("%" PRIuMAX " %s (%08x)\n", (uintmax_t) offset, + printf("%" PRIuMAX " %s (%08"PRIx32")\n", + (uintmax_t) offset, sha1_to_hex(entries[i].sha1), ntohl(entries[i].crc)); } |