From d9e99680845314a5d7c26de7a5c5801efdb70526 Mon Sep 17 00:00:00 2001 From: dim Date: Fri, 16 Dec 2011 23:42:25 +0000 Subject: 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 --- share/mk/bsd.sys.mk | 3 +++ 1 file changed, 3 insertions(+) (limited to 'share/mk') 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 -- cgit v1.1