Skip to content

Commit

Permalink
Do a sweep and remove most WARNS=6 settings
Browse files Browse the repository at this point in the history
Repeating the default WARNS here makes it slightly more difficult to
experiment with default WARNS changes, e.g. if we did something absolutely
bananas and introduced a WARNS=7 and wanted to try lifting the default to
that.

Drop most of them; there is one in the blake2 kernel module, but I suspect
it should be dropped -- the default WARNS in the rest of the build doesn't
currently apply to kernel modules, and I haven't put too much thought into
whether it makes sense to make it so.
  • Loading branch information
kevans91 committed Oct 1, 2020
1 parent 9f66998 commit 7cc42f6
Showing 99 changed files with 2 additions and 137 deletions.
2 changes: 0 additions & 2 deletions cddl/Makefile.inc
Original file line number Diff line number Diff line change
@@ -7,8 +7,6 @@ IGNORE_PRAGMA= YES

CFLAGS+= -DNEED_SOLARIS_BOOLEAN

WARNS?= 6

# Do not lint the CDDL stuff. It is all externally maintained and
# lint output is wasteful noise here.

2 changes: 0 additions & 2 deletions gnu/usr.bin/dialog/Makefile
Original file line number Diff line number Diff line change
@@ -7,6 +7,4 @@ LIBADD= dialog ncursesw m
CFLAGS+= -I${.CURDIR} -I${DIALOG}
.PATH: ${DIALOG}

WARNS?= 6

.include <bsd.prog.mk>
2 changes: 0 additions & 2 deletions lib/googletest/Makefile.inc
Original file line number Diff line number Diff line change
@@ -10,5 +10,3 @@ CXXFLAGS+= ${GTESTS_FLAGS}

# Silence warnings about usage of deprecated std::auto_ptr
CXXWARNFLAGS+= -Wno-deprecated-declarations

WARNS?= 6
2 changes: 0 additions & 2 deletions lib/libcam/tests/Makefile
Original file line number Diff line number Diff line change
@@ -5,6 +5,4 @@ ATF_TESTS_C+= cam_test

LIBADD+= cam

WARNS?= 6

.include <bsd.test.mk>
1 change: 0 additions & 1 deletion lib/libcrypt/tests/Makefile
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ ATF_TESTS_C+= crypt_tests

NETBSD_ATF_TESTS_C+= crypt_test

WARNS?= 6
CFLAGS+= -I${.CURDIR:H}
LIBADD= crypt

1 change: 0 additions & 1 deletion lib/libiconv_modules/Makefile.inc
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
.PATH: ${SRCTOP}/lib/libc/iconv

SHLIB_MAJOR= 4
WARNS?= 6
CFLAGS+= -I${SRCTOP}/lib/libc/iconv

CFLAGS+= -Dbool=_Bool
2 changes: 0 additions & 2 deletions lib/libkvm/Makefile
Original file line number Diff line number Diff line change
@@ -8,8 +8,6 @@ SHLIBDIR?= /lib
SHLIB_MAJOR= 7
CFLAGS+=-DNO__SCCSID -I${.CURDIR}

WARNS?= 6

SRCS= kvm.c kvm_cptime.c kvm_getloadavg.c \
kvm_getswapinfo.c kvm_pcpu.c kvm_private.c kvm_proc.c kvm_vnet.c \
kvm_minidump_aarch64.c \
2 changes: 0 additions & 2 deletions lib/libkvm/tests/Makefile
Original file line number Diff line number Diff line change
@@ -13,8 +13,6 @@ CFLAGS.kvm_read_test+= -I${.CURDIR:H}

LIBADD+= kvm

WARNS?= 6

BINDIR= ${TESTSDIR}

.for t in kvm_geterr_test kvm_open_test kvm_open2_test kvm_read_test
1 change: 0 additions & 1 deletion lib/libpathconv/tests/Makefile
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
TAP_TESTS_C+= abs2rel
TAP_TESTS_C+= rel2abs

WARNS?= 6
#LIBADD+= pathconv
#LDADD+= -L .. -lpathconv
LDADD+= ../libpathconv.a
1 change: 0 additions & 1 deletion lib/libproc/tests/Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ PROGS= target_prog
SRCS_target_prog= target_prog.c
BINDIR_target_prog= ${TESTSDIR}

WARNS?= 6
LIBADD= elf proc rtld_db util

# Ensure that symbols aren't stripped from the test program, as they're needed
2 changes: 0 additions & 2 deletions lib/libsbuf/tests/Makefile
Original file line number Diff line number Diff line change
@@ -6,6 +6,4 @@ ATF_TESTS_C+= sbuf_string_test

LIBADD+= sbuf util

WARNS?= 6

.include <bsd.test.mk>
1 change: 0 additions & 1 deletion libexec/Makefile.inc
Original file line number Diff line number Diff line change
@@ -3,5 +3,4 @@

BINDIR?= /usr/libexec

WARNS?= 6
WFORMAT?= 1
1 change: 0 additions & 1 deletion libexec/getty/Makefile
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ SRCS= main.c init.c subr.c chat.c
LIBADD= util
MAN= gettytab.5 ttys.5 getty.8

WARNS?= 6
WFORMAT=0

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion libexec/rtld-elf/Makefile
Original file line number Diff line number Diff line change
@@ -40,7 +40,6 @@ RTLD_ARCH= ${MACHINE_CPUARCH}
CFLAGS+= -I${RTLD_ELF_DIR}/${RTLD_ARCH} -I${RTLD_ELF_DIR}

NO_WCAST_ALIGN= yes
WARNS?= 6
INSTALLFLAGS= -C -b
PRECIOUSPROG=
BINDIR= /libexec
1 change: 0 additions & 1 deletion libexec/rtld-elf/tests/libpythagoras/Makefile
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ SHLIBDIR= ${TESTSBASE}/libexec/rtld-elf

SRCS= pythagoras.c

WARNS?= 6
LIBADD= m

.include <bsd.lib.mk>
1 change: 0 additions & 1 deletion libexec/tftpd/tests/Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ ATF_TESTS_C= functional
TEST_METADATA.functional+= timeout=15

LIBADD= util
WARNS?= 6
CSTD= c11

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions sbin/decryptcore/Makefile
Original file line number Diff line number Diff line change
@@ -8,6 +8,4 @@ MAN= decryptcore.8

CFLAGS+=-I${SRCTOP}/lib/libpjdlog

WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion sbin/pfilctl/Makefile
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@

PROG= pfilctl
SRCS= pfilctl.c
WARNS?= 6

MAN= pfilctl.8

2 changes: 0 additions & 2 deletions sbin/ping/tests/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# $FreeBSD$

WARNS?= 6

ATF_TESTS_C+= in_cksum_test
SRCS.in_cksum_test= in_cksum_test.c ../utils.c

2 changes: 0 additions & 2 deletions sbin/recoverdisk/Makefile
Original file line number Diff line number Diff line change
@@ -5,8 +5,6 @@ PROG= recoverdisk

LDFLAGS += -lm

WARNS?= 6

.include <bsd.prog.mk>

test: ${PROG}
2 changes: 0 additions & 2 deletions sys/teken/demo/Makefile
Original file line number Diff line number Diff line change
@@ -4,6 +4,4 @@ PROG= teken_demo
LDADD= -lncursesw -lteken -lutil
MAN=

WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion sys/teken/libteken/Makefile
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ LIB= teken
SHLIB_MAJOR= 0

CFLAGS+=-I.
WARNS?= 6

SRCDIR= ${.CURDIR}/..
.PATH: ${SRCDIR}
2 changes: 0 additions & 2 deletions sys/teken/stress/Makefile
Original file line number Diff line number Diff line change
@@ -4,6 +4,4 @@ PROG= teken_stress
LDADD= -lteken
MAN=

WARNS?= 6

.include <bsd.prog.mk>
2 changes: 0 additions & 2 deletions tests/sys/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# $FreeBSD$

WARNS?= 6

.include "${SRCTOP}/tests/Makefile.inc0"
2 changes: 0 additions & 2 deletions tests/sys/aio/Makefile
Original file line number Diff line number Diff line change
@@ -17,6 +17,4 @@ LIBADD.lio_test+= rt

CFLAGS+= -I${.CURDIR:H:H}

WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/audit/Makefile
Original file line number Diff line number Diff line change
@@ -51,8 +51,6 @@ TEST_METADATA+= required_user="root"
TEST_METADATA+= is_exclusive="true"
TEST_METADATA+= required_files="/etc/rc.d/auditd /dev/auditpipe"

WARNS?= 6

LDFLAGS+= -lbsm -lutil

CFLAGS.process-control.c+= -I${SRCTOP}/tests
1 change: 0 additions & 1 deletion tests/sys/auditpipe/Makefile
Original file line number Diff line number Diff line change
@@ -6,6 +6,5 @@ ATF_TESTS_C= auditpipe_test

TEST_METADATA+= required_user="root"
TEST_METADATA+= required_files="/dev/auditpipe"
WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/capsicum/Makefile
Original file line number Diff line number Diff line change
@@ -52,6 +52,4 @@ WARNS.capsicum-test= 3

.endif

WARNS?= 6

.include <bsd.test.mk>
1 change: 0 additions & 1 deletion tests/sys/devrandom/Makefile
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ SDEVRANDOM= ${SRCTOP}/sys/dev/random
.PATH: ${SDEVRANDOM}

TESTSDIR= ${TESTSBASE}/sys/devrandom
WARNS?= 6

CFLAGS+= -I${SRCTOP}/sys

2 changes: 0 additions & 2 deletions tests/sys/fs/fusefs/Makefile
Original file line number Diff line number Diff line change
@@ -82,6 +82,4 @@ LIBADD+= pthread
LIBADD+= gmock gtest
LIBADD+= util

WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/kern/pipe/Makefile
Original file line number Diff line number Diff line change
@@ -12,6 +12,4 @@ PLAIN_TESTS_C+= pipe_reverse2_test
PLAIN_TESTS_C+= pipe_reverse_test
PLAIN_TESTS_C+= pipe_wraparound_test

WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/mqueue/Makefile
Original file line number Diff line number Diff line change
@@ -16,6 +16,4 @@ PROGS+= mqtest5

LIBADD+= rt

WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/net/Makefile
Original file line number Diff line number Diff line change
@@ -25,6 +25,4 @@ PROGS+= randsleep

CFLAGS+= -I${.CURDIR:H:H}

WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/netinet/Makefile
Original file line number Diff line number Diff line change
@@ -20,6 +20,4 @@ ${PACKAGE}FILESMODE_redirect.py=0555

MAN=

WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/netmap/Makefile
Original file line number Diff line number Diff line change
@@ -11,6 +11,4 @@ PLAIN_TESTS_C+= ctrl-api-test
CFLAGS+= -I${SRCTOP}/tests
LIBADD+= pthread

WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/opencrypto/Makefile
Original file line number Diff line number Diff line change
@@ -21,6 +21,4 @@ PYMODULES= cryptodev.py cryptodevh.py cryptotest.py

${PACKAGE}FILES+= ${PYMODULES}

WARNS?= 6

.include <bsd.test.mk>
2 changes: 0 additions & 2 deletions tests/sys/pjdfstest/pjdfstest/Makefile
Original file line number Diff line number Diff line change
@@ -10,6 +10,4 @@ MAN=

CFLAGS+= -I${.CURDIR:H}

WARNS?= 6

.include <bsd.prog.mk>
2 changes: 0 additions & 2 deletions tools/regression/aio/aiop/Makefile
Original file line number Diff line number Diff line change
@@ -3,6 +3,4 @@
PROG= aiop
MAN=

WARNS= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/bpf/bpf_filter/Makefile
Original file line number Diff line number Diff line change
@@ -46,7 +46,6 @@ SRCS+= ${SYSDIR}/net/bpf_jitter.c \
${SYSDIR}/${MACHINE_ARCH}/${MACHINE_ARCH}/bpf_jit_machdep.c
CFLAGS+= -DBPF_JIT_COMPILER
LIBS+= -lutil
WARNS?= 6
.else
SRCS+= ${SYSDIR}/net/bpf_filter.c
WARNS?= 2
1 change: 0 additions & 1 deletion tools/regression/doat/Makefile
Original file line number Diff line number Diff line change
@@ -3,6 +3,5 @@
PROG= doat

MAN=
WARNS?=6

.include <bsd.prog.mk>
2 changes: 0 additions & 2 deletions tools/regression/geom_gpt/Makefile
Original file line number Diff line number Diff line change
@@ -5,6 +5,4 @@ MAN=

LIBADD+= geom

WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/include/stdatomic/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# $FreeBSD$

PROG= logic
WARNS=6
MAN=

.include <bsd.prog.mk>
2 changes: 0 additions & 2 deletions tools/regression/netinet/ipbroadcast/Makefile
Original file line number Diff line number Diff line change
@@ -5,6 +5,4 @@
PROG= ipbroadcast
MAN=

WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/rpcsec_gss/Makefile
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@

PROG= rpctest
MAN=
WARNS?= 6
LIBADD= rpcsec_gss
DEBUG_FLAGS= -g -O0

1 change: 0 additions & 1 deletion tools/regression/sockets/accept_fd_leak/Makefile
Original file line number Diff line number Diff line change
@@ -4,6 +4,5 @@

PROG= accept_fd_leak
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/accf_data_attach/Makefile
Original file line number Diff line number Diff line change
@@ -4,6 +4,5 @@

PROG= accf_data_attach
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/fstat/Makefile
Original file line number Diff line number Diff line change
@@ -4,6 +4,5 @@

PROG= fstat
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/kqueue/Makefile
Original file line number Diff line number Diff line change
@@ -4,6 +4,5 @@

PROG= kqueue
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/listen_backlog/Makefile
Original file line number Diff line number Diff line change
@@ -2,6 +2,5 @@

PROG= listen_backlog
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/listen_kqueue/Makefile
Original file line number Diff line number Diff line change
@@ -2,6 +2,5 @@

PROG= listen_kqueue
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/listenclose/Makefile
Original file line number Diff line number Diff line change
@@ -4,6 +4,5 @@

PROG= listenclose
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/pr_atomic/Makefile
Original file line number Diff line number Diff line change
@@ -2,6 +2,5 @@

PROG= pr_atomic
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/reconnect/Makefile
Original file line number Diff line number Diff line change
@@ -4,6 +4,5 @@

PROG= reconnect
MAN=
WARNS?= 6

.include <bsd.prog.mk>
1 change: 0 additions & 1 deletion tools/regression/sockets/rtsocket/Makefile
Original file line number Diff line number Diff line change
@@ -2,6 +2,5 @@

PROG= rtsocket
MAN=
WARNS?= 6

.include <bsd.prog.mk>
Loading

0 comments on commit 7cc42f6

Please sign in to comment.