diff options
author | dim <dim@FreeBSD.org> | 2011-12-16 23:42:25 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-12-16 23:42:25 +0000 |
commit | d9e99680845314a5d7c26de7a5c5801efdb70526 (patch) | |
tree | 30211c9462b984a7aaa887c1b96d45486f60b8c0 /share | |
parent | bbbfdb636703946f63e5c4da8868e33f48430762 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | share/mk/bsd.sys.mk | 3 |
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 |