Annotate intentional handler fallthrough
Some checks failed
libakerror CI Build / coverage (push) Successful in 2m51s
libakerror CI Build / cmake_build (push) Successful in 2m53s
libakerror CI Build / thread_sanitizer (push) Failing after 5m53s
libakerror CI Build / mutation_test (push) Successful in 37m49s

Co-authored-by: Andrew Kesterson <andrew@aklabs.net>
This commit is contained in:
2026-08-02 23:52:04 -04:00
parent 11cc5578fe
commit a902c95155
2 changed files with 21 additions and 0 deletions

View File

@@ -263,6 +263,14 @@ foreach(_test IN LISTS AKERR_TESTS)
endif()
endforeach()
# HANDLE_GROUP deliberately enters the next case label. Keep that public macro
# compiling with the warning enabled, so a future macro edit cannot restore the
# warning for consumers which adopt -Wextra.
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(test_err_handle_group PRIVATE
-Werror=implicit-fallthrough)
endif()
set_tests_properties(
${AKERR_WILL_FAIL_TESTS}
PROPERTIES WILL_FAIL TRUE