From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [RFH] gcc constant expression warning...
Date: Sun, 28 Oct 2007 01:46:47 -0700 [thread overview]
Message-ID: <7vy7dnvd6w.fsf@gitster.siamese.dyndns.org> (raw)
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-statement
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);
next reply other threads:[~2007-10-28 8:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-28 8:46 Junio C Hamano [this message]
2007-10-28 10:21 ` [RFH] gcc constant expression warning Florian Weimer
2007-10-28 16:28 ` Daniel Barkalow
2007-10-28 10:37 ` Antti-Juhani Kaijanaho
2007-10-28 17:09 ` Linus Torvalds
2007-10-29 0:55 ` Nicolas Pitre
2007-10-29 2:41 ` Stephen Rothwell
2007-10-29 4:37 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vy7dnvd6w.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).