From: Junio C Hamano Date: Wed, 21 Dec 2011 20:41:17 GMT Subject: Re: [PATCH 4/4] Suppress "statement not reached" warnings under Sun Studio Message-ID: <7vk45pfyj6.fsf@alter.siamese.dyndns.org> In-Reply-To: Ævar Arnfjörð Bjarmason writes: > That would make that warning go away, but I don't know if that changes > the semantics of the code. I was aiming not to change any code, just > to squash spurious warnings under Sun Studio. Well, earlier we skipped "if it is NUL return 1 and otherwise make sure it is a directory separator" check and went directly into whatever happens after we see a directory separator. The patch causes the same without goto. If the code is too complex to confuse not so bright compilers, it is likely to confuse no so bright humans as well, and rewriting the logic in a more straightforward way to help humans is independently a good thing. I am not particularly interested in squashing spurious warnings, but if it falls out of a side effect of helping humans, I wouldn't object to it.