]> granicus.if.org Git - git/commitdiff
Squelch warning about an integer overflow
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 26 Oct 2015 13:15:21 +0000 (14:15 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Oct 2015 20:23:59 +0000 (13:23 -0700)
We cannot rely on long integers to have more than 32 bits.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h

index 400e92108687e31dd16fbcea1a43e04556b98566..6a16e20966cd5b084a4490267a3082258ea6e7bb 100644 (file)
@@ -475,7 +475,7 @@ extern int git_munmap(void *start, size_t length);
 #endif
 
 #define DEFAULT_PACKED_GIT_LIMIT \
-       ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
+       ((1024L * 1024L) * (size_t)(sizeof(void*) >= 8 ? 8192 : 256))
 
 #ifdef NO_PREAD
 #define pread git_pread