Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'Wcast-function-type-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux

Pull cast-function-type warning addition from Gustavo A. R. Silva:
"This globally enables -Wcast-function-type.

We need to make sure new function cast mismatches are not introduced
in the kernel in order to avoid tripping CFI checking"

* tag 'Wcast-function-type-5.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
Makefile: Enable -Wcast-function-type

+5
+5
Makefile
··· 953 953 # disable pointer signed / unsigned warnings in gcc 4.0 954 954 KBUILD_CFLAGS += -Wno-pointer-sign 955 955 956 + # In order to make sure new function cast mismatches are not introduced 957 + # in the kernel (to avoid tripping CFI checking), the kernel should be 958 + # globally built with -Wcast-function-type. 959 + KBUILD_CFLAGS += $(call cc-option, -Wcast-function-type) 960 + 956 961 # disable stringop warnings in gcc 8+ 957 962 KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation) 958 963