Put the warning flags to where they belong (into CWARNFLAGS).
This allows us to easily override them when necessary, e.g., to selectively disable warnings in libc/ contributed sources.
This commit is contained in:
parent
4689c8bb31
commit
50e03cff1d
@ -11,28 +11,28 @@
|
|||||||
.if !defined(NO_WARNS)
|
.if !defined(NO_WARNS)
|
||||||
. if defined(WARNS)
|
. if defined(WARNS)
|
||||||
. if ${WARNS} > 0
|
. if ${WARNS} > 0
|
||||||
CFLAGS += -Wsystem-headers
|
CWARNFLAGS += -Wsystem-headers
|
||||||
. if !defined(NO_WERROR)
|
. if !defined(NO_WERROR)
|
||||||
CFLAGS += -Werror
|
CWARNFLAGS += -Werror
|
||||||
. endif
|
. endif
|
||||||
. endif
|
. endif
|
||||||
. if ${WARNS} > 1
|
. if ${WARNS} > 1
|
||||||
CFLAGS += -Wall -Wno-format-y2k
|
CWARNFLAGS += -Wall -Wno-format-y2k
|
||||||
. endif
|
. endif
|
||||||
. if ${WARNS} > 2
|
. if ${WARNS} > 2
|
||||||
CFLAGS += -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
CWARNFLAGS += -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
||||||
. endif
|
. endif
|
||||||
. if ${WARNS} > 3
|
. if ${WARNS} > 3
|
||||||
CFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align
|
CWARNFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align
|
||||||
. endif
|
. endif
|
||||||
# BDECFLAGS
|
# BDECFLAGS
|
||||||
. if ${WARNS} > 5
|
. if ${WARNS} > 5
|
||||||
CFLAGS += -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
|
CWARNFLAGS += -Wbad-function-cast -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
|
||||||
. endif
|
. endif
|
||||||
. if ${WARNS} > 1 && ${WARNS} < 5
|
. if ${WARNS} > 1 && ${WARNS} < 5
|
||||||
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
|
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
|
||||||
# XXX always get it right.
|
# XXX always get it right.
|
||||||
CFLAGS += -Wno-uninitialized
|
CWARNFLAGS += -Wno-uninitialized
|
||||||
. endif
|
. endif
|
||||||
. endif
|
. endif
|
||||||
|
|
||||||
@ -41,10 +41,10 @@ WFORMAT = 1
|
|||||||
. endif
|
. endif
|
||||||
. if defined(WFORMAT)
|
. if defined(WFORMAT)
|
||||||
. if ${WFORMAT} > 0
|
. if ${WFORMAT} > 0
|
||||||
#CFLAGS += -Wformat-nonliteral -Wformat-security -Wno-format-extra-args
|
#CWARNFLAGS += -Wformat-nonliteral -Wformat-security -Wno-format-extra-args
|
||||||
CFLAGS += -Wformat=2 -Wno-format-extra-args
|
CWARNFLAGS += -Wformat=2 -Wno-format-extra-args
|
||||||
. if !defined(NO_WERROR)
|
. if !defined(NO_WERROR)
|
||||||
CFLAGS += -Werror
|
CWARNFLAGS += -Werror
|
||||||
. endif
|
. endif
|
||||||
. endif
|
. endif
|
||||||
. endif
|
. endif
|
||||||
|
Loading…
Reference in New Issue
Block a user