From: Junio C Hamano <gitster@pobox.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: Guido Ostkamp <git@ostkamp.fastmail.fm>, git@vger.kernel.org
Subject: Re: [PATCH] Fix Solaris compiler warnings
Date: Fri, 16 Nov 2007 01:14:19 -0800 [thread overview]
Message-ID: <7vve82zh5g.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20071116074850.GA3400@steel.home> (Alex Riesen's message of "Fri, 16 Nov 2007 08:48:50 +0100")
Alex Riesen <raa.lkml@gmail.com> writes:
> Junio C Hamano, Fri, Nov 16, 2007 00:16:25 +0100:
>> Alex Riesen <raa.lkml@gmail.com> writes:
>>
>> > Guido Ostkamp, Thu, Nov 15, 2007 23:19:11 +0100:
>> ...
>> >> CC builtin-apply.o
>> >> "builtin-apply.c", line 686: warning: statement not reached
>> >> CC utf8.o
>> >> "utf8.c", line 287: warning: statement not reached
>> >> CC xdiff/xdiffi.o
>> >> "xdiff/xdiffi.c", line 261: warning: statement not reached
>> >
>> > All these are wrong. That's a fantastically broken piece of compiler
>>
>> I've looked at builtin-apply and utf8 cases but these returns
>> are after an endless loop whose exit paths always return
>> directly, so these return statements are in fact never reached.
>> ...
>
> Hmm... Guido, I owe you an appology. Still, consider this patch
> instead (it does not fix the return in xdiff/xdiffi.c though):
If you are referring to the "xdiff/xdiffi.c:line 261" one (which
I did not say if I looked at it or not), I think there is
nothing to fix there, either. In front of itt is a big fat loop
controlled with:
for (ec = 1;; ec++) {
...
}
and only exits from there are returns. Two "break" appear but
they are breaking out of nested inner loops and would not escape
this outermost loop.
next prev parent reply other threads:[~2007-11-16 9:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-15 22:19 [PATCH] Fix Solaris compiler warnings Guido Ostkamp
2007-11-15 23:00 ` Alex Riesen
2007-11-15 23:16 ` Junio C Hamano
2007-11-16 7:48 ` Alex Riesen
2007-11-16 9:14 ` Junio C Hamano [this message]
2007-11-16 22:52 ` Guido Ostkamp
2007-11-17 9:46 ` [PATCH] Rewrite some function exit paths to avoid "unreachable code" traps Alex Riesen
2007-11-17 10:39 ` Robin Rosenberg
2007-11-17 12:23 ` Alex Riesen
2007-11-17 14:31 ` Robin Rosenberg
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=7vve82zh5g.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@ostkamp.fastmail.fm \
--cc=git@vger.kernel.org \
--cc=raa.lkml@gmail.com \
/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).