Re: [PATCH 4/4] Suppress "statement not reached" warnings under Sun Studio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]