From 5ad910123aafa0254f67291b3314f4439a6a8736 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 21 Jun 2020 19:09:48 -0700 Subject: [PATCH] configure: Use -Wimplicit-fallthrough=2 instead of -Wimplicit-fallthrough=3 This makes clang accept /* fallthrough */ as a fallthrough annotation. Signed-off-by: Bart Van Assche --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 3ee8aaf2..63b30555 100755 --- a/configure +++ b/configure @@ -2548,7 +2548,7 @@ fi print_config "__kernel_rwf_t" "$__kernel_rwf_t" ########################################## -# check if gcc has -Wimplicit-fallthrough +# check if gcc has -Wimplicit-fallthrough=2 fallthrough="no" cat > $TMPC << EOF int main(int argc, char **argv) @@ -2556,10 +2556,10 @@ int main(int argc, char **argv) return 0; } EOF -if compile_prog "-Wimplicit-fallthrough" "" "-Wimplicit-fallthrough"; then +if compile_prog "-Wimplicit-fallthrough=2" "" "-Wimplicit-fallthrough=2"; then fallthrough="yes" fi -print_config "-Wimplicit-fallthrough" "$fallthrough" +print_config "-Wimplicit-fallthrough=2" "$fallthrough" ########################################## # check for MADV_HUGEPAGE support -- 2.25.1