Add -Wthread-safety to WARNS=6.

While there, add a NO_WTHREAD_SAFETY flag that can be used to disable
this specific warning flag. Disable it for auditdistd. We can easily
patch up auditdistd to have the right annotations to build, but as
auditdistd is intended to be portable across other operating systems,
it's not worth the effort.

Approved by:	brueffer@
This commit is contained in:
Ed Schouten 2014-09-01 20:18:09 +00:00
parent 8da5129816
commit 13b7412dad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270951
2 changed files with 7 additions and 0 deletions

View File

@ -54,6 +54,9 @@ CWARNFLAGS+= -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls\
.if !defined(NO_WMISSING_VARIABLE_DECLARATIONS)
CWARNFLAGS.clang+= -Wmissing-variable-declarations
.endif
.if !defined(NO_WTHREAD_SAFETY)
CWARNFLAGS.clang+= -Wthread-safety
.endif
.endif # WARNS >= 6
.if ${WARNS} >= 2 && ${WARNS} <= 4
# XXX Delete -Wuninitialized by default for now -- the compiler doesn't

View File

@ -30,4 +30,8 @@ YFLAGS+=-v
CLEANFILES=parse.c parse.h parse.output
# auditdistd cannot use FreeBSD specific lock annotation macros. Disable
# thread safety analysis completely.
NO_WTHREAD_SAFETY=
.include <bsd.prog.mk>