]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
Makefile.extrawarn: Move -Wcast-function-type-strict to W=1
authorSami Tolvanen <samitolvanen@google.com>
Fri, 30 Sep 2022 20:33:10 +0000 (20:33 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 Nov 2022 14:12:05 +0000 (15:12 +0100)
commitf557b734cff920c820f2944489ee23e1fa094a69
treec8ea62fad9422b0e2c7246b9ac2983c4ac2b71f9
parentc6bc038476894110a933c52bf3cf69fe3ea6fd31
Makefile.extrawarn: Move -Wcast-function-type-strict to W=1

BugLink: https://bugs.launchpad.net/bugs/1995637
commit 2120635108b35ecad9c59c8b44f6cbdf4f98214e 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
scripts/Makefile.extrawarn