configure: inhibit the implicit-fallthrough warning on gcc-12

... since it no longer acknowledges the comment markup we use for that
purpose.

Reported-by: Younes El-karama
Fixes #7295
Closes #7307
This commit is contained in:
Daniel Stenberg 2021-06-28 17:01:29 +02:00
parent 278b46751e
commit b5a434f7f0
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 4 additions and 1 deletions

View File

@ -1033,7 +1033,10 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [alloc-zero])
tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
if test "$compiler_num" -lt "1200"; then
dnl gcc 12 doesn't acknowledge our comment markups
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
fi
fi
#
fi