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>
This commit is contained in:

committed by
Junio C Hamano

parent
db5d6666af
commit
6e1c23442a
@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user