Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] Fix Solaris compiler warnings

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:52

Alex Riesen [off-list ref] writes:
Junio C Hamano, Fri, Nov 16, 2007 00:16:25 +0100:
quoted
Alex Riesen [off-list ref] writes:
quoted
Guido Ostkamp, Thu, Nov 15, 2007 23:19:11 +0100:
...
quoted
quoted
    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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help