diff --git a/share/mk/bsd.kern.mk b/share/mk/bsd.kern.mk index ba78e3b34249..d81fd7ce6995 100644 --- a/share/mk/bsd.kern.mk +++ b/share/mk/bsd.kern.mk @@ -3,8 +3,12 @@ # # Warning flags for compiling the kernel and components of the kernel. # +# Note that the newly added -Wcast-qual is responsible for generating +# most of the remaining warnings. Warnings introduced with -Wall will +# also pop up, but are easier to fix. +# CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ - -Wmissing-prototypes -Wpointer-arith -Winline \ + -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -fformat-extensions -ansi # # The following flags are next up for working on: diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index ba78e3b34249..d81fd7ce6995 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -3,8 +3,12 @@ # # Warning flags for compiling the kernel and components of the kernel. # +# Note that the newly added -Wcast-qual is responsible for generating +# most of the remaining warnings. Warnings introduced with -Wall will +# also pop up, but are easier to fix. +# CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ - -Wmissing-prototypes -Wpointer-arith -Winline \ + -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -fformat-extensions -ansi # # The following flags are next up for working on: