From dc7d7b0c51e05e2da15bb9ec33cf9c5385e4f3fc Mon Sep 17 00:00:00 2001 From: ru Date: Tue, 30 May 2006 19:18:01 +0000 Subject: [PATCH] Enable -Wundef warnings for kernel/module compiles. From cpp.info: `-Wundef' Warn whenever an identifier which is not a macro is encountered in an `#if' directive, outside of `defined'. Such identifiers are replaced with zero. --- sys/conf/kern.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 54c5905f0a6f..cea8af14a4a3 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -12,7 +12,10 @@ CWARNFLAGS= .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -fformat-extensions -std=c99 + ${_wundef} -fformat-extensions -std=c99 +.if !defined(NO_UNDEF) +_wundef= -Wundef +.endif .endif # # The following flags are next up for working on: