Skip to content

build: disable warning -Wunreachable-code-break - #1481

Closed
vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:cm-disable-warning
Closed

vszakats wants to merge 1 commit into
libssh2:masterfrom
vszakats:cm-disable-warning

Conversation

@vszakats

Copy link
Copy Markdown
Member

This warning remains silent in unity builds. Since we're using unity
in CI for most jobs, warnings remain undetected there.
Disable them for all builds to avoid a surprise warning outside our CI.

It also doesn't work in any #included .c sources, like the crypto
backend sources.

The issue caught by the warning is useful for a tidy codebase, but
doesn't affect executed code. It was enabled in
84338c4de2d7c798e3c270c9610d51a4ad18a90b #12331 (2023-11-15).

llvm source: https://github.com/llvm/llvm-project/blob/fee2953f23bd8a8a71e574e6a8db08033778d3a4/clang/lib/Sema/AnalysisBasedWarnings.cpp#L125-L134
llvm issue: llvm/llvm-project#71046

Follow-up to 7ecc309 #1224

@vszakats vszakats added the build label Oct 28, 2024
This warning remains silent in unity builds. Since we're using unity
in CI for most jobs, warnings remain undetected there.
Disable them for all builds to avoid a surprise warning outside our CI.

It also doesn't work in any #included `.c` sources, like the crypto
backend sources, `agent_win.c` or `blowfish.c`.

The issue caught by the warning is useful for a tidy codebase, but
doesn't affect executed code. It was enabled in
84338c4de2d7c798e3c270c9610d51a4ad18a90b #12331 (2023-11-15).

llvm source: https://github.com/llvm/llvm-project/blob/fee2953f23bd8a8a71e574e6a8db08033778d3a4/clang/lib/Sema/AnalysisBasedWarnings.cpp#L125-L134
llvm issue: llvm/llvm-project#71046

Follow-up to 7ecc309 libssh2#1224
@vszakats vszakats closed this in 4844e36 Oct 28, 2024
@vszakats
vszakats deleted the cm-disable-warning branch October 28, 2024 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant