diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2020-12-16 00:50:27 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-15 16:32:50 -0800 |
commit | 56f56ac50b932310c629832fad256e624ca451e3 (patch) | |
tree | 021707d7d8db0ffeb116c291298594d15d6c01ff /.gitmodules | |
parent | Git 2.29.2 (diff) | |
download | tgif-56f56ac50b932310c629832fad256e624ca451e3.tar.xz |
style: do not "break" in switch() after "return"
Remove this unreachable code. It was found by SunCC, it's found by a
non-fatal warning emitted by SunCC. It's one of the things it's more
vehement about than GCC & Clang.
It complains about a lot of other similarly unreachable code, e.g. a
BUG(...) without a "return", and a "return 0" after a long if/else,
both of whom have "return" statements. Those are also genuine
redundancies to a compiler, but arguably make the code a bit easier to
read & less fragile to maintain.
These return/break cases are just unnecessary however, and as seen
here the surrounding code just did a plain "return" without a "break"
already.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '.gitmodules')
0 files changed, 0 insertions, 0 deletions