From 1100c0013116f4af50d7a5b8bf23db2a13892714 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sat, 2 Jan 2010 09:50:19 +0000 Subject: [PATCH] Make WARNS=6 the default for libexec/. Just like bin/ and sbin/, I think setting WARNS to the highest value possible will make it more attractive for people to fix warnings. - The WARNS variable is set in the Makefile in the directory of the application itself, making it more likely that it will be removed out of curiosity to see what happens. - New applications will most likely build with WARNS=6 out of the box, because the author would more likely fix the warnings during development than lower WARNS. Unfortunately almost all apps in libexec require a lowered value of WARNS. --- libexec/Makefile.inc | 2 ++ libexec/atrun/Makefile | 2 ++ libexec/bootpd/Makefile | 2 ++ libexec/bootpd/Makefile.inc | 2 ++ libexec/bootpd/tools/Makefile.inc | 2 ++ libexec/fingerd/Makefile | 2 +- libexec/getty/Makefile | 2 ++ libexec/mail.local/Makefile | 2 ++ libexec/mknetid/Makefile | 2 ++ libexec/pppoed/Makefile | 1 + libexec/rbootd/Makefile | 1 + libexec/revnetgroup/Makefile | 2 ++ libexec/rpc.rquotad/Makefile | 2 -- libexec/rpc.rstatd/Makefile | 2 ++ libexec/rpc.rusersd/Makefile | 3 --- libexec/rpc.rwalld/Makefile | 2 ++ libexec/rpc.sprayd/Makefile | 3 ++- libexec/rshd/Makefile | 1 + libexec/rtld-elf/Makefile | 1 + libexec/smrsh/Makefile | 2 ++ libexec/talkd/Makefile | 1 - libexec/tcpd/Makefile | 2 ++ libexec/tftp-proxy/Makefile | 2 ++ libexec/tftpd/Makefile | 3 +++ libexec/ulog-helper/Makefile | 2 -- libexec/ypxfr/Makefile | 3 +++ 26 files changed, 41 insertions(+), 10 deletions(-) diff --git a/libexec/Makefile.inc b/libexec/Makefile.inc index 05deedc6127..7b6a65fc717 100644 --- a/libexec/Makefile.inc +++ b/libexec/Makefile.inc @@ -2,4 +2,6 @@ # $FreeBSD$ BINDIR?= /usr/libexec + +WARNS?= 6 WFORMAT?= 1 diff --git a/libexec/atrun/Makefile b/libexec/atrun/Makefile index 4e3d4ccace5..273055997c0 100644 --- a/libexec/atrun/Makefile +++ b/libexec/atrun/Makefile @@ -13,6 +13,8 @@ CLEANFILES= ${MAN} CFLAGS+=-I${MAINSRC} -I${.CURDIR} CFLAGS+=-DLOGIN_CAP -DPAM + +WARNS?= 2 WFORMAT=0 DPADD= ${LIBPAM} ${LIBUTIL} diff --git a/libexec/bootpd/Makefile b/libexec/bootpd/Makefile index 830577a57de..6f02477d466 100644 --- a/libexec/bootpd/Makefile +++ b/libexec/bootpd/Makefile @@ -5,6 +5,8 @@ PROG= bootpd CFLAGS+= -DETC_ETHERS CFLAGS+= -DSYSLOG -DDEBUG -DVEND_CMU +WARNS?= 2 + SUBDIR= bootpgw tools SRCS= bootpd.c dovend.c readfile.c hash.c dumptab.c \ diff --git a/libexec/bootpd/Makefile.inc b/libexec/bootpd/Makefile.inc index 829da300445..899c9b53689 100644 --- a/libexec/bootpd/Makefile.inc +++ b/libexec/bootpd/Makefile.inc @@ -1,3 +1,5 @@ # $FreeBSD$ BINDIR?= /usr/libexec + +WARNS?= 1 diff --git a/libexec/bootpd/tools/Makefile.inc b/libexec/bootpd/tools/Makefile.inc index 4d7876162d2..f4a306f1a32 100644 --- a/libexec/bootpd/tools/Makefile.inc +++ b/libexec/bootpd/tools/Makefile.inc @@ -2,3 +2,5 @@ # $FreeBSD$ BINDIR= /usr/sbin + +WARNS?= 1 diff --git a/libexec/fingerd/Makefile b/libexec/fingerd/Makefile index ae92564cda9..b6382ad7970 100644 --- a/libexec/fingerd/Makefile +++ b/libexec/fingerd/Makefile @@ -5,8 +5,8 @@ PROG= fingerd DPADD= ${LIBUTIL} LDADD= -lutil MAN= fingerd.8 -WARNS?= 2 +WARNS?= 2 WFORMAT=0 .include diff --git a/libexec/getty/Makefile b/libexec/getty/Makefile index 697e81ae0bb..f9679586a48 100644 --- a/libexec/getty/Makefile +++ b/libexec/getty/Makefile @@ -6,6 +6,8 @@ SRCS= main.c init.c subr.c chat.c DPADD= ${LIBUTIL} LDADD= -lutil MAN= gettytab.5 ttys.5 getty.8 + +WARNS?= 1 WFORMAT=0 .include diff --git a/libexec/mail.local/Makefile b/libexec/mail.local/Makefile index 57837d11166..3e59609e893 100644 --- a/libexec/mail.local/Makefile +++ b/libexec/mail.local/Makefile @@ -8,6 +8,8 @@ PROG= mail.local SRCS= mail.local.c MAN= mail.local.8 CFLAGS+=-I${SENDMAIL_DIR}/include -I. + +WARNS?= 2 WFORMAT=0 LIBSMDIR= ${.OBJDIR}/../../lib/libsm diff --git a/libexec/mknetid/Makefile b/libexec/mknetid/Makefile index 6941b8fde41..5ca06621376 100644 --- a/libexec/mknetid/Makefile +++ b/libexec/mknetid/Makefile @@ -5,4 +5,6 @@ SRCS= mknetid.c hash.c parse_group.c MAN= netid.5 mknetid.8 +WARNS?= 2 + .include diff --git a/libexec/pppoed/Makefile b/libexec/pppoed/Makefile index 0f0c78eda4f..1ffaffe3eed 100644 --- a/libexec/pppoed/Makefile +++ b/libexec/pppoed/Makefile @@ -5,6 +5,7 @@ DPADD= ${LIBNETGRAPH} LDADD= -lnetgraph MAN= pppoed.8 +WARNS?= 1 WFORMAT=0 .include diff --git a/libexec/rbootd/Makefile b/libexec/rbootd/Makefile index 3a4099e4a8b..70b6555c964 100644 --- a/libexec/rbootd/Makefile +++ b/libexec/rbootd/Makefile @@ -5,6 +5,7 @@ PROG= rbootd SRCS= bpf.c conf.c parseconf.c rbootd.c rmpproto.c utils.c MAN= rbootd.8 +WARNS?= 1 WFORMAT=0 .include diff --git a/libexec/revnetgroup/Makefile b/libexec/revnetgroup/Makefile index 70883714134..d3b36fa98b1 100644 --- a/libexec/revnetgroup/Makefile +++ b/libexec/revnetgroup/Makefile @@ -5,4 +5,6 @@ SRCS= revnetgroup.c hash.c parse_netgroup.c MAN= revnetgroup.8 +WARNS?= 2 + .include diff --git a/libexec/rpc.rquotad/Makefile b/libexec/rpc.rquotad/Makefile index feacce57ef4..331f6ab6e2b 100644 --- a/libexec/rpc.rquotad/Makefile +++ b/libexec/rpc.rquotad/Makefile @@ -4,8 +4,6 @@ PROG = rpc.rquotad SRCS = rquotad.c MAN = rpc.rquotad.8 -WARNS ?= 6 - DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc diff --git a/libexec/rpc.rstatd/Makefile b/libexec/rpc.rstatd/Makefile index 1083447dd39..d1a12eaec5f 100644 --- a/libexec/rpc.rstatd/Makefile +++ b/libexec/rpc.rstatd/Makefile @@ -7,4 +7,6 @@ MAN = rpc.rstatd.8 DPADD= ${LIBRPCSVC} ${LIBUTIL} ${LIBDEVSTAT} LDADD= -lrpcsvc -lutil -ldevstat +WARNS?= 1 + .include diff --git a/libexec/rpc.rusersd/Makefile b/libexec/rpc.rusersd/Makefile index e88674b6de3..18918944d9d 100644 --- a/libexec/rpc.rusersd/Makefile +++ b/libexec/rpc.rusersd/Makefile @@ -4,8 +4,6 @@ PROG = rpc.rusersd SRCS = rusersd.c rusers_proc.c MAN = rpc.rusersd.8 -WARNS?= 6 - DPADD= ${LIBRPCSVC} ${LIBULOG} ${LIBUTIL} LDADD= -lrpcsvc -lulog -lutil @@ -14,5 +12,4 @@ LDADD= -lrpcsvc -lulog -lutil #LDADD+= -L/usr/X11R6/lib -lXext -lX11 #.endif - .include diff --git a/libexec/rpc.rwalld/Makefile b/libexec/rpc.rwalld/Makefile index 83182e904b3..b09d6635855 100644 --- a/libexec/rpc.rwalld/Makefile +++ b/libexec/rpc.rwalld/Makefile @@ -7,4 +7,6 @@ MAN = rpc.rwalld.8 DPADD= ${LIBUTIL} LDADD= -lutil +WARNS?= 2 + .include diff --git a/libexec/rpc.sprayd/Makefile b/libexec/rpc.sprayd/Makefile index 1dd582de008..5b1cb241c25 100644 --- a/libexec/rpc.sprayd/Makefile +++ b/libexec/rpc.sprayd/Makefile @@ -7,5 +7,6 @@ MAN = rpc.sprayd.8 DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc -.include +WARNS?= 2 +.include diff --git a/libexec/rshd/Makefile b/libexec/rshd/Makefile index 155314ad611..f6881e8e1c5 100644 --- a/libexec/rshd/Makefile +++ b/libexec/rshd/Makefile @@ -4,6 +4,7 @@ PROG= rshd MAN= rshd.8 +WARNS?= 3 WFORMAT=0 DPADD= ${LIBUTIL} ${LIBPAM} diff --git a/libexec/rtld-elf/Makefile b/libexec/rtld-elf/Makefile index 5e9729c68bd..d6df617d424 100644 --- a/libexec/rtld-elf/Makefile +++ b/libexec/rtld-elf/Makefile @@ -12,6 +12,7 @@ CSTD?= gnu99 CFLAGS+= -Wall -DFREEBSD_ELF -DIN_RTLD CFLAGS+= -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR} LDFLAGS+= -nostdlib -e .rtld_start +WARNS?= 2 INSTALLFLAGS= -C -b PRECIOUSPROG= BINDIR= /libexec diff --git a/libexec/smrsh/Makefile b/libexec/smrsh/Makefile index 6fd2801f780..ae86155d0d0 100644 --- a/libexec/smrsh/Makefile +++ b/libexec/smrsh/Makefile @@ -15,6 +15,8 @@ LIBSM= ${LIBSMDIR}/libsm.a DPADD= ${LIBSM} LDADD= ${LIBSM} +WARNS?= 2 + SRCS+= sm_os.h CLEANFILES+=sm_os.h diff --git a/libexec/talkd/Makefile b/libexec/talkd/Makefile index 4900857f5c1..7f82f1f217d 100644 --- a/libexec/talkd/Makefile +++ b/libexec/talkd/Makefile @@ -7,7 +7,6 @@ SRCS= talkd.c announce.c process.c table.c print.c ttymsg.c MAN= talkd.8 CFLAGS+=-I${.CURDIR}/../../usr.bin/wall -WARNS?= 6 DPADD= ${LIBULOG} LDADD= -lulog diff --git a/libexec/tcpd/Makefile b/libexec/tcpd/Makefile index 6bb6080e3a3..e707a4e334e 100644 --- a/libexec/tcpd/Makefile +++ b/libexec/tcpd/Makefile @@ -18,4 +18,6 @@ CFLAGS+=-DINET6 DPADD= ${LIBWRAP} LDADD= -lwrap +WARNS?= 1 + .include diff --git a/libexec/tftp-proxy/Makefile b/libexec/tftp-proxy/Makefile index 45d806857ef..d8541c4b818 100644 --- a/libexec/tftp-proxy/Makefile +++ b/libexec/tftp-proxy/Makefile @@ -6,4 +6,6 @@ PROG= tftp-proxy SRCS= tftp-proxy.c filter.c MAN= tftp-proxy.8 +WARNS?= 3 + .include diff --git a/libexec/tftpd/Makefile b/libexec/tftpd/Makefile index 6036d4c0df4..6c29243a666 100644 --- a/libexec/tftpd/Makefile +++ b/libexec/tftpd/Makefile @@ -5,7 +5,10 @@ PROG= tftpd SRCS= tftpd.c tftpsubs.c DPADD= ${LIBUTIL} LDADD= -lutil + +WARNS?= 1 WFORMAT=0 + MAN= tftpd.8 CFLAGS+=-I${.CURDIR}/../../usr.bin/tftp .PATH: ${.CURDIR}/../../usr.bin/tftp diff --git a/libexec/ulog-helper/Makefile b/libexec/ulog-helper/Makefile index c4202000d61..c1697c8fd12 100644 --- a/libexec/ulog-helper/Makefile +++ b/libexec/ulog-helper/Makefile @@ -8,6 +8,4 @@ NO_MAN= DPADD= ${LIBULOG} LDADD= -lulog -WARNS?= 6 - .include diff --git a/libexec/ypxfr/Makefile b/libexec/ypxfr/Makefile index 72978eb17d9..91a42eff177 100644 --- a/libexec/ypxfr/Makefile +++ b/libexec/ypxfr/Makefile @@ -12,7 +12,10 @@ GENSRCS=yp.h yp_clnt.c ypxfr_clnt.c MAN= ypxfr.8 CFLAGS+= -I. + +WARNS?= 2 WFORMAT=0 + DPADD= ${LIBRPCSVC} LDADD= -lrpcsvc