summaryrefslogtreecommitdiff
path: root/show-index.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2008-07-03 15:52:09 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-06 00:26:29 (GMT)
commit6e1c23442a0315ad440bb8457703dcf1ad943b96 (patch)
tree029bfdb329dfdaeb8a85787c6548fbf06d191b78 /show-index.c
parentdb5d6666afb9f315f9c9ac74a5d638f07cf9cbe0 (diff)
downloadgit-6e1c23442a0315ad440bb8457703dcf1ad943b96.zip
git-6e1c23442a0315ad440bb8457703dcf1ad943b96.tar.gz
git-6e1c23442a0315ad440bb8457703dcf1ad943b96.tar.bz2
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/show-index.c b/show-index.c
index 7253991..45bb535 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));
}