summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.sys.mk
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2001-05-19 23:32:19 +0000
committerkris <kris@FreeBSD.org>2001-05-19 23:32:19 +0000
commit4029cc246407340715ca56a02dd207ed1f53aa24 (patch)
tree33ce87f1a9ee61b1df6f8a38396e412b68bd28c2 /share/mk/bsd.sys.mk
parentb2bb87a93e4c87872527bed2ea89b13e858f6b44 (diff)
downloadFreeBSD-src-4029cc246407340715ca56a02dd207ed1f53aa24.zip
FreeBSD-src-4029cc246407340715ca56a02dd207ed1f53aa24.tar.gz
Only add -Werror if in fact we have set WARNS or WFORMAT to >0
Diffstat (limited to 'share/mk/bsd.sys.mk')
-rw-r--r--share/mk/bsd.sys.mk10
1 files changed, 6 insertions, 4 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index efb69a9..566917c 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -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
OpenPOWER on IntegriCloud