build: disable warning -Wunreachable-code-break
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. The issue caught by the warning is useful for a tidy codebase, but doesn't affect executed code. It was enabled in84338c4de2#12331 (2023-11-15). llvm source:fee2953f23/clang/lib/Sema/AnalysisBasedWarnings.cpp (L125-L134)llvm issue: https://github.com/llvm/llvm-project/issues/71046 Follow-up to7c023c3f6e#15384 Closes #15416
This commit is contained in:
parent
e77326403d
commit
0da1489eb9
@ -138,7 +138,7 @@ if(PICKY_COMPILER)
|
|||||||
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.3))
|
(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.3))
|
||||||
list(APPEND _picky_enable
|
list(APPEND _picky_enable
|
||||||
${_picky_common}
|
${_picky_common}
|
||||||
-Wunreachable-code-break # clang 3.5 appleclang 6.0
|
# -Wunreachable-code-break # clang 3.5 appleclang 6.0 # Not used: Silent in "unity" builds
|
||||||
-Wheader-guard # clang 3.4 appleclang 5.1
|
-Wheader-guard # clang 3.4 appleclang 5.1
|
||||||
-Wsometimes-uninitialized # clang 3.2 appleclang 4.6
|
-Wsometimes-uninitialized # clang 3.2 appleclang 4.6
|
||||||
)
|
)
|
||||||
|
|||||||
@ -879,7 +879,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||||||
dnl Only clang 3.5 or later
|
dnl Only clang 3.5 or later
|
||||||
if test "$compiler_num" -ge "305"; then
|
if test "$compiler_num" -ge "305"; then
|
||||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pragmas])
|
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pragmas])
|
||||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code-break])
|
# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code-break]) # Not used: Silent in "unity" builds
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
dnl Only clang 3.6 or later
|
dnl Only clang 3.6 or later
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user