summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.sys.mk
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2011-12-16 23:42:25 +0000
committerdim <dim@FreeBSD.org>2011-12-16 23:42:25 +0000
commitd9e99680845314a5d7c26de7a5c5801efdb70526 (patch)
tree30211c9462b984a7aaa887c1b96d45486f60b8c0 /share/mk/bsd.sys.mk
parentbbbfdb636703946f63e5c4da8868e33f48430762 (diff)
downloadFreeBSD-src-d9e99680845314a5d7c26de7a5c5801efdb70526.zip
FreeBSD-src-d9e99680845314a5d7c26de7a5c5801efdb70526.tar.gz
Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang,
to selectively work around warnings in programs that don't use flexible array members, but instead define arrays of length 1 at the end of the struct, and then access those beyond their declared bounds. MFC after: 1 week
Diffstat (limited to 'share/mk/bsd.sys.mk')
-rw-r--r--share/mk/bsd.sys.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index de7355f..061a270 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -70,6 +70,9 @@ CWARNFLAGS += -Wno-switch-enum
. if ${WARNS} <= 1
CWARNFLAGS += -Wno-parentheses
. endif
+. if defined(NO_WARRAY_BOUNDS)
+CWARNFLAGS += -Wno-array-bounds
+. endif
. endif
. endif
OpenPOWER on IntegriCloud