Commit 01367e86 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'Wcast-function-type-5.17-rc1' of...

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
parents 3e3a138a 552a23a0
...@@ -953,6 +953,11 @@ KBUILD_CFLAGS += -Wvla ...@@ -953,6 +953,11 @@ KBUILD_CFLAGS += -Wvla
# disable pointer signed / unsigned warnings in gcc 4.0 # disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += -Wno-pointer-sign KBUILD_CFLAGS += -Wno-pointer-sign
# In order to make sure new function cast mismatches are not introduced
# in the kernel (to avoid tripping CFI checking), the kernel should be
# globally built with -Wcast-function-type.
KBUILD_CFLAGS += $(call cc-option, -Wcast-function-type)
# disable stringop warnings in gcc 8+ # disable stringop warnings in gcc 8+
KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation) KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment