[RFH] gcc constant expression warning...
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 28, 2007, 08:46 UTC
- Message-ID
- <7vy7dnvd6w.fsf@gitster.siamese.dyndns.org>
With the recent gcc, we get:
sha1_file.c: In check_packed_git_: sha1_file.c:527: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false sha1_file.c:527: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false
when compiling with
-O2 -Werror -Wall -Wold-style-definition \
-ansi -pedantic -std=c99 -Wdeclaration-after-statementThe offending lines are:
if (idx_size != min_size) {
/* make sure we can deal with large pack offsets */
off_t x = 0x7fffffffUL, y = 0xffffffffUL;
if (x > (x + 1) || y > (y + 1)) {
munmap(idx_map, idx_size);