mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-28 20:55:21 +00:00
Only add -Werror if in fact we have set WARNS or WFORMAT to >0
This commit is contained in:
parent
46adf91a3b
commit
45703321ea
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=76863
|
@ -13,6 +13,9 @@ CFLAGS += -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
|||
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't
|
||||
# XXX always get it right.
|
||||
CFLAGS += -Wno-uninitialized
|
||||
. if !defined(NO_WERROR)
|
||||
CFLAGS += -Werror
|
||||
. endif
|
||||
. endif
|
||||
. if ${WARNS} > 1
|
||||
CFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow
|
||||
|
@ -25,11 +28,10 @@ WFORMAT = 1
|
|||
. if defined(WFORMAT)
|
||||
. if ${WFORMAT} > 0
|
||||
CFLAGS += -Wnon-const-format -Wno-format-extra-args
|
||||
. endif
|
||||
. endif
|
||||
|
||||
. if !defined(NO_WERROR)
|
||||
. if !defined(NO_WERROR)
|
||||
CFLAGS += -Werror
|
||||
. endif
|
||||
. endif
|
||||
. endif
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue