diff options
author | ed <ed@FreeBSD.org> | 2013-04-19 19:45:00 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2013-04-19 19:45:00 +0000 |
commit | 120125784a1ca698c656c6ef5e21e219df994f64 (patch) | |
tree | 1891dfdc2dd1f99e115fc2d96089a475729f0e87 /usr.bin | |
parent | e342f91158ed3a8e688d9b01fd14d57ad91ea8b0 (diff) | |
download | FreeBSD-src-120125784a1ca698c656c6ef5e21e219df994f64.zip FreeBSD-src-120125784a1ca698c656c6ef5e21e219df994f64.tar.gz |
Add the Clang specific -Wmissing-variable-declarations to WARNS=6.
This compiler flag enforces that that people either mark variables
static or use an external declarations for the variable, similar to how
-Wmissing-prototypes works for functions.
Due to the fact that Yacc/Lex generate code that cannot trivially be
changed to not warn because of this (lots of yy* variables), add a
NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this
specific compiler warning.
Announced on: toolchain@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ar/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/bc/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/bzip2recover/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/find/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/indent/Makefile | 3 | ||||
-rw-r--r-- | usr.bin/m4/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/mklocale/Makefile | 2 |
7 files changed, 15 insertions, 2 deletions
diff --git a/usr.bin/ar/Makefile b/usr.bin/ar/Makefile index fa25072..03d9814 100644 --- a/usr.bin/ar/Makefile +++ b/usr.bin/ar/Makefile @@ -8,6 +8,8 @@ SRCS= ar.c acplex.l acpyacc.y read.c util.c write.c y.tab.h DPADD= ${LIBARCHIVE} ${LIBELF} ${LIBZ} LDADD= -larchive -lelf -lz +NO_WMISSING_VARIABLE_DECLARATIONS= + CFLAGS+=-I. -I${.CURDIR} .if ${MK_SHARED_TOOLCHAIN} == "no" diff --git a/usr.bin/bc/Makefile b/usr.bin/bc/Makefile index 55f465d..39d54e0 100644 --- a/usr.bin/bc/Makefile +++ b/usr.bin/bc/Makefile @@ -8,6 +8,8 @@ CFLAGS+= -I. -I${.CURDIR} DPADD= ${LIBEDIT} ${LIBTERMCAP} LDADD= -ledit -ltermcap +NO_WMISSING_VARIABLE_DECLARATIONS= + FILES+= bc.library FILESDIR=${SHAREDIR}/misc diff --git a/usr.bin/bzip2recover/Makefile b/usr.bin/bzip2recover/Makefile index 7f61946..affe91b 100644 --- a/usr.bin/bzip2recover/Makefile +++ b/usr.bin/bzip2recover/Makefile @@ -6,4 +6,6 @@ BZ2DIR= ${.CURDIR}/../../contrib/bzip2 PROG= bzip2recover NO_MAN= +NO_WMISSING_VARIABLE_DECLARATIONS= + .include <bsd.prog.mk> diff --git a/usr.bin/find/Makefile b/usr.bin/find/Makefile index 0c7bb70..cd10f12 100644 --- a/usr.bin/find/Makefile +++ b/usr.bin/find/Makefile @@ -6,4 +6,6 @@ SRCS= find.c function.c ls.c main.c misc.c operator.c option.c \ getdate.y YFLAGS= +NO_WMISSING_VARIABLE_DECLARATIONS= + .include <bsd.prog.mk> diff --git a/usr.bin/indent/Makefile b/usr.bin/indent/Makefile index 8d9ff94..dcd7e39 100644 --- a/usr.bin/indent/Makefile +++ b/usr.bin/indent/Makefile @@ -1,6 +1,9 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $FreeBSD$ PROG= indent SRCS= indent.c io.c lexi.c parse.c pr_comment.c args.c +NO_WMISSING_VARIABLE_DECLARATIONS= + .include <bsd.prog.mk> diff --git a/usr.bin/m4/Makefile b/usr.bin/m4/Makefile index 1f1ec5e..f0e22f8 100644 --- a/usr.bin/m4/Makefile +++ b/usr.bin/m4/Makefile @@ -8,8 +8,8 @@ PROG= m4 CFLAGS+=-DEXTENDED -I${.CURDIR} -I${.CURDIR}/lib DPADD= ${LIBY} ${LIBL} ${LIBM} LDADD= -ly -ll -lm -# clang needs 1 while with gcc we can use 2 -#WARNS= 1 + +NO_WMISSING_VARIABLE_DECLARATIONS= SRCS= eval.c expr.c look.c main.c misc.c gnum4.c trace.c parser.y tokenizer.l .PATH: ${.CURDIR}/lib diff --git a/usr.bin/mklocale/Makefile b/usr.bin/mklocale/Makefile index e75fe99..83850c4 100644 --- a/usr.bin/mklocale/Makefile +++ b/usr.bin/mklocale/Makefile @@ -5,4 +5,6 @@ PROG= mklocale SRCS= yacc.y lex.l y.tab.h CFLAGS+= -I. -I${.CURDIR} -I${.CURDIR}/../../lib/libc/locale +NO_WMISSING_VARIABLE_DECLARATIONS= + .include <bsd.prog.mk> |