mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 14:19:16 +00:00
Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
commit 2120635108
upstream.
We enable -Wcast-function-type globally in the kernel to warn about
mismatching types in function pointer casts. Compilers currently
warn only about ABI incompability with this flag, but Clang 16 will
enable a stricter version of the check by default that checks for an
exact type match. This will be very noisy in the kernel, so disable
-Wcast-function-type-strict without W=1 until the new warnings have
been addressed.
Cc: stable@vger.kernel.org
Link: https://reviews.llvm.org/D134831
Link: https://github.com/ClangBuiltLinux/linux/issues/1724
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220930203310.4010564-1-samitolvanen@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cf46ee80c6
commit
c98cbc2519
1 changed files with 1 additions and 0 deletions
|
@ -74,5 +74,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length)
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
|
KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized)
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
|
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast)
|
||||||
KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)
|
KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access)
|
||||||
|
KBUILD_CFLAGS += $(call cc-disable-warning, cast-function-type-strict)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue