Skip to content

build: Enable -Wunreachable-code

It seems a bit confusing to write code after a return. This can even lead to bugs, or incorrect code, such as https://github.com/bitcoin/bitcoin/pull/28830/files#r1415372320 . (Edit: The linked instance is not found by clang's -Wunreachable-code).

Fix all issues by enabling -Wunreachable-code.

This flag also enables -Wunreachable-code-loop-increment, according to https://clang.llvm.org/docs/DiagnosticsReference.html#wunreachable-code, so remove that.

Merge request reports

Loading