Re: [RFH] gcc constant expression warning...
- From
- Florian Weimer <fw@deneb.enyo.de>
- Date
- Oct 28, 2007, 10:21 UTC
- Message-ID
- <87ir4rletv.fsf@mid.deneb.enyo.de>
- In-Reply-To
- <7vy7dnvd6w.fsf@gitster.siamese.dyndns.org>
* Junio C. Hamano:
Show 7 quoted lines
> The 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);x and y must be unsigned for this test to work (signed overflow is undefined).