aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2010-01-02 09:58:07 +0000
committerEd Schouten <ed@FreeBSD.org>2010-01-02 09:58:07 +0000
commitdaaf5759104f210a9315f49f80f1e0f01a8b3bff (patch)
tree040818bcab6b7921d3cb5cb2ff04c4d488e8d3ea /lib
parent1100c0013116f4af50d7a5b8bf23db2a13892714 (diff)
downloadsrc-daaf5759104f210a9315f49f80f1e0f01a8b3bff.tar.gz
src-daaf5759104f210a9315f49f80f1e0f01a8b3bff.zip
Build lib/ with WARNS=6 by default.
Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and lower it when needed. I'm setting WARNS?=0 for secure/. It seems secure/ includes the Makefile.inc provided by lib/. I'm not going to touch that directory. Most of the code there is contributed anyway.
Notes
Notes: svn path=/head/; revision=201381
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.inc2
-rw-r--r--lib/csu/Makefile.inc2
-rw-r--r--lib/csu/arm/Makefile2
-rw-r--r--lib/csu/i386-elf/Makefile1
-rw-r--r--lib/csu/mips/Makefile2
-rw-r--r--lib/libarchive/Makefile2
-rw-r--r--lib/libauditd/Makefile2
-rw-r--r--lib/libautofs/Makefile1
-rw-r--r--lib/libbegemot/Makefile2
-rw-r--r--lib/libbsm/Makefile2
-rw-r--r--lib/libbz2/Makefile2
-rw-r--r--lib/libcalendar/Makefile1
-rw-r--r--lib/libcam/Makefile1
-rw-r--r--lib/libcompat/Makefile2
-rw-r--r--lib/libcrypt/Makefile2
-rw-r--r--lib/libdevinfo/Makefile2
-rw-r--r--lib/libdevstat/Makefile2
-rw-r--r--lib/libdwarf/Makefile2
-rw-r--r--lib/libedit/Makefile2
-rw-r--r--lib/libelf/Makefile2
-rw-r--r--lib/libexpat/Makefile2
-rw-r--r--lib/libftpio/Makefile2
-rw-r--r--lib/libgpib/Makefile1
-rw-r--r--lib/libgssapi/Makefile1
-rw-r--r--lib/libipsec/Makefile2
-rw-r--r--lib/libipx/Makefile2
-rw-r--r--lib/libjail/Makefile2
-rw-r--r--lib/libkiconv/Makefile2
-rw-r--r--lib/libkvm/Makefile2
-rw-r--r--lib/libmagic/Makefile2
-rw-r--r--lib/libmd/Makefile2
-rw-r--r--lib/libmilter/Makefile2
-rw-r--r--lib/libmp/Makefile1
-rw-r--r--lib/libncp/Makefile2
-rw-r--r--lib/libngatm/Makefile1
-rw-r--r--lib/libopie/Makefile2
-rw-r--r--lib/libpam/modules/Makefile.inc2
-rw-r--r--lib/libpam/modules/pam_exec/Makefile2
-rw-r--r--lib/libpam/modules/pam_krb5/Makefile1
-rw-r--r--lib/libpam/modules/pam_radius/Makefile2
-rw-r--r--lib/libpam/modules/pam_ssh/Makefile2
-rw-r--r--lib/libpcap/Makefile2
-rw-r--r--lib/libpmc/Makefile2
-rw-r--r--lib/libproc/Makefile2
-rw-r--r--lib/libradius/Makefile2
-rw-r--r--lib/librpcsec_gss/Makefile1
-rw-r--r--lib/librt/Makefile2
-rw-r--r--lib/libsbuf/Makefile1
-rw-r--r--lib/libsm/Makefile2
-rw-r--r--lib/libsmdb/Makefile2
-rw-r--r--lib/libsmutil/Makefile2
-rw-r--r--lib/libstand/Makefile2
-rw-r--r--lib/libtacplus/Makefile2
-rw-r--r--lib/libthread_db/Makefile1
-rw-r--r--lib/libufs/Makefile2
-rw-r--r--lib/libugidfw/Makefile2
-rw-r--r--lib/libulog/Makefile2
-rw-r--r--lib/libusb/Makefile2
-rw-r--r--lib/libutil/Makefile2
-rw-r--r--lib/libvgl/Makefile1
-rw-r--r--lib/libwrap/Makefile2
-rw-r--r--lib/liby/Makefile4
-rw-r--r--lib/libypclnt/Makefile1
-rw-r--r--lib/libz/Makefile2
-rw-r--r--lib/ncurses/Makefile.inc2
65 files changed, 81 insertions, 37 deletions
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
index e9cf750939ce..d77e2dbd15d5 100644
--- a/lib/Makefile.inc
+++ b/lib/Makefile.inc
@@ -1,3 +1,5 @@
# $FreeBSD$
# Default version for system libs (override in <lib>/Makefile if necessary)
SHLIB_MAJOR?= 5
+
+WARNS?= 6
diff --git a/lib/csu/Makefile.inc b/lib/csu/Makefile.inc
index 3545446762df..51e9fdfa7478 100644
--- a/lib/csu/Makefile.inc
+++ b/lib/csu/Makefile.inc
@@ -1,3 +1,5 @@
# $FreeBSD$
SSP_CFLAGS=
+
+WARNS?= 6
diff --git a/lib/csu/arm/Makefile b/lib/csu/arm/Makefile
index 097f82df1f9b..da0eb125ce83 100644
--- a/lib/csu/arm/Makefile
+++ b/lib/csu/arm/Makefile
@@ -9,6 +9,8 @@ CFLAGS+= -Wall -Wno-unused \
-I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include
+WARNS?= 2
+
all: ${OBJS}
CLEANFILES= ${OBJS}
diff --git a/lib/csu/i386-elf/Makefile b/lib/csu/i386-elf/Makefile
index c2af118fe4f4..8e6f50d57dd4 100644
--- a/lib/csu/i386-elf/Makefile
+++ b/lib/csu/i386-elf/Makefile
@@ -8,7 +8,6 @@ FILESOWN= ${LIBOWN}
FILESGRP= ${LIBGRP}
FILESMODE= ${LIBMODE}
FILESDIR= ${LIBDIR}
-WARNS?= 6
CFLAGS+= -I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include
CLEANFILES= ${FILES} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
diff --git a/lib/csu/mips/Makefile b/lib/csu/mips/Makefile
index 097f82df1f9b..da0eb125ce83 100644
--- a/lib/csu/mips/Makefile
+++ b/lib/csu/mips/Makefile
@@ -9,6 +9,8 @@ CFLAGS+= -Wall -Wno-unused \
-I${.CURDIR}/../common \
-I${.CURDIR}/../../libc/include
+WARNS?= 2
+
all: ${OBJS}
CLEANFILES= ${OBJS}
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile
index fc4c6e4bec3e..8de8247b64df 100644
--- a/lib/libarchive/Makefile
+++ b/lib/libarchive/Makefile
@@ -22,8 +22,6 @@ DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
.endif
-WARNS?= 6
-
# Headers to be installed in /usr/include
INCS= archive.h archive_entry.h
diff --git a/lib/libauditd/Makefile b/lib/libauditd/Makefile
index 48ec4b143132..24873836394b 100644
--- a/lib/libauditd/Makefile
+++ b/lib/libauditd/Makefile
@@ -17,6 +17,8 @@ SRCS= auditd_lib.c
#
CFLAGS+= -I${OPENBSMDIR} -I${LIBBSMDIR}
+WARNS?= 3
+
NO_MAN=
.include <bsd.lib.mk>
diff --git a/lib/libautofs/Makefile b/lib/libautofs/Makefile
index ea4d8cfa1768..197585699766 100644
--- a/lib/libautofs/Makefile
+++ b/lib/libautofs/Makefile
@@ -3,7 +3,6 @@
LIB= autofs
SHLIB_MAJOR= 3
-WARNS?= 4
SRCS= libautofs.c
INCS= libautofs.h
diff --git a/lib/libbegemot/Makefile b/lib/libbegemot/Makefile
index b964e6bd6112..27baf563cff6 100644
--- a/lib/libbegemot/Makefile
+++ b/lib/libbegemot/Makefile
@@ -8,8 +8,6 @@ LIB= begemot
SHLIB_MAJOR= 4
SHLIBDIR?= /lib
-# WARNS?= 6
-
CFLAGS+= -DUSE_SELECT -DQUADFMT='"ll"'
SRCS= rpoll.c
INCS= rpoll.h
diff --git a/lib/libbsm/Makefile b/lib/libbsm/Makefile
index 157b61ead3b8..eec2c409144f 100644
--- a/lib/libbsm/Makefile
+++ b/lib/libbsm/Makefile
@@ -33,6 +33,8 @@ SRCS= bsm_audit.c \
#
CFLAGS+= -I${OPENBSMDIR} -I${LIBBSMDIR}
+WARNS?= 1
+
INCS= audit_uevents.h libbsm.h
INCSDIR= ${INCLUDEDIR}/bsm
diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile
index 6ea018bcfa4e..b505927b4fb7 100644
--- a/lib/libbz2/Makefile
+++ b/lib/libbz2/Makefile
@@ -10,4 +10,6 @@ SRCS= bzlib.c blocksort.c compress.c crctable.c decompress.c \
INCS= bzlib.h
CFLAGS+= -I${BZ2DIR}
+WARNS?= 3
+
.include <bsd.lib.mk>
diff --git a/lib/libcalendar/Makefile b/lib/libcalendar/Makefile
index 8bba20b726ba..b0ae002fd5e9 100644
--- a/lib/libcalendar/Makefile
+++ b/lib/libcalendar/Makefile
@@ -1,7 +1,6 @@
# $FreeBSD$
LIB= calendar
-WARNS?= 2
SRCS= calendar.c easter.c
INCS= calendar.h
diff --git a/lib/libcam/Makefile b/lib/libcam/Makefile
index 2bbad9ab6fce..1f819d085900 100644
--- a/lib/libcam/Makefile
+++ b/lib/libcam/Makefile
@@ -11,6 +11,7 @@ LDADD= -lsbuf
MAN= cam.3 cam_cdbparse.3
+WARNS?= 2
MLINKS+= cam.3 cam_open_device.3 \
cam.3 cam_open_spec_device.3 \
diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile
index 106bab970af4..2ca46f0eb57b 100644
--- a/lib/libcompat/Makefile
+++ b/lib/libcompat/Makefile
@@ -5,6 +5,8 @@ LIB=compat
CFLAGS+=-DLIBC_SCCS -DSYSLIBC_SCCS -I${.CURDIR}/../libc/locale
NO_PIC=
+WARNS?= 1
+
.PATH: ${.CURDIR}/4.1/${MACHINE_ARCH} ${.CURDIR}/4.1 \
${.CURDIR}/4.3/${MACHINE_ARCH} ${.CURDIR}/4.3 \
${.CURDIR}/4.4/${MACHINE_ARCH} ${.CURDIR}/4.4 \
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index be0826dc99e7..285f6728203d 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -33,6 +33,8 @@ SRCS+= auth.c property.c
CFLAGS+= -D${sym}=__${sym}
.endfor
+WARNS?= 2
+
PRECIOUSLIB=
.include <bsd.lib.mk>
diff --git a/lib/libdevinfo/Makefile b/lib/libdevinfo/Makefile
index 0615195f9385..9e755d73b0d4 100644
--- a/lib/libdevinfo/Makefile
+++ b/lib/libdevinfo/Makefile
@@ -5,4 +5,6 @@ SRCS= devinfo.c
INCS= devinfo.h
MAN= devinfo.3
+WARNS?= 3
+
.include <bsd.lib.mk>
diff --git a/lib/libdevstat/Makefile b/lib/libdevstat/Makefile
index c6233c2331a8..aeb07b9f0647 100644
--- a/lib/libdevstat/Makefile
+++ b/lib/libdevstat/Makefile
@@ -33,6 +33,6 @@ MLINKS+=devstat.3 compute_etime.3
CFLAGS+=-I${.CURDIR}
-WARNS?= 2
+WARNS?= 3
.include <bsd.lib.mk>
diff --git a/lib/libdwarf/Makefile b/lib/libdwarf/Makefile
index 9a1a5498efca..86c707a641e8 100644
--- a/lib/libdwarf/Makefile
+++ b/lib/libdwarf/Makefile
@@ -23,8 +23,6 @@ CFLAGS+= -I. -I${.CURDIR}
SHLIB_MAJOR= 2
-WARNS?= 6
-
WITHOUT_MAN= yes
.include <bsd.lib.mk>
diff --git a/lib/libedit/Makefile b/lib/libedit/Makefile
index ece60329bac8..97c1f920787b 100644
--- a/lib/libedit/Makefile
+++ b/lib/libedit/Makefile
@@ -35,6 +35,8 @@ CFLAGS+= -I. -I${.CURDIR}
CFLAGS+= #-DDEBUG_TTY -DDEBUG_KEY -DDEBUG_READ -DDEBUG -DDEBUG_REFRESH
CFLAGS+= #-DDEBUG_PASTE -DDEBUG_EDIT
+WARNS?= 1
+
AHDR= vi.h emacs.h common.h
ASRC= ${.CURDIR}/vi.c ${.CURDIR}/emacs.c ${.CURDIR}/common.c
diff --git a/lib/libelf/Makefile b/lib/libelf/Makefile
index b22148d59713..30e508076a82 100644
--- a/lib/libelf/Makefile
+++ b/lib/libelf/Makefile
@@ -60,8 +60,6 @@ CFLAGS+= -I. -I${.CURDIR}
SHLIB_MAJOR= 1
-WARNS?= 6
-
MAN= elf.3 \
elf_begin.3 \
elf_cntl.3 \
diff --git a/lib/libexpat/Makefile b/lib/libexpat/Makefile
index e39368497e10..ab9b0e80d689 100644
--- a/lib/libexpat/Makefile
+++ b/lib/libexpat/Makefile
@@ -14,6 +14,8 @@ MAN= libbsdxml.3
CFLAGS+= -I${.CURDIR} -DHAVE_EXPAT_CONFIG_H
CLEANFILES= bsdxml.h bsdxml_external.h
+WARNS?= 2
+
# OK, so it is not entirely unadultered: we ammend the COPYING
# to point people to the right place, get rid of some VMS stuff
# and use FreeBSD style indempotency #ifndefs. We also want to
diff --git a/lib/libftpio/Makefile b/lib/libftpio/Makefile
index bb9c9eb6e5da..2082ec57b03b 100644
--- a/lib/libftpio/Makefile
+++ b/lib/libftpio/Makefile
@@ -15,6 +15,8 @@ CLEANFILES= ftperr.c
CFLAGS+= -DINET6
.endif
+WARNS?= 2
+
ftperr.c: ftp.errors
@echo '#include <stdio.h>' > ${.TARGET}
@echo '#include "ftpio.h"' >> ${.TARGET}
diff --git a/lib/libgpib/Makefile b/lib/libgpib/Makefile
index 5465d8b993ad..caf6bcfaa2a7 100644
--- a/lib/libgpib/Makefile
+++ b/lib/libgpib/Makefile
@@ -5,6 +5,5 @@ SHLIB_MAJOR= 3
INCS= gpib.h
INCSDIR= ${INCLUDEDIR}/gpib
SRCS= ibfoo.c
-WARNS?= 6
.include <bsd.lib.mk>
diff --git a/lib/libgssapi/Makefile b/lib/libgssapi/Makefile
index 63d441c34b93..3f016b49bb73 100644
--- a/lib/libgssapi/Makefile
+++ b/lib/libgssapi/Makefile
@@ -2,7 +2,6 @@
LIB= gssapi
SHLIB_MAJOR= 10
-WARNS= 6
VERSION_DEF= ${.CURDIR}/../libc/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
diff --git a/lib/libipsec/Makefile b/lib/libipsec/Makefile
index 5455945ddd79..840aefa54f27 100644
--- a/lib/libipsec/Makefile
+++ b/lib/libipsec/Makefile
@@ -48,6 +48,8 @@ CLEANFILES+= y.tab.c y.tab.h
YFLAGS+=-d -p __libipsecyy
LFLAGS+=-P__libipsecyy
+WARNS?= 2
+
MAN= ipsec_set_policy.3 ipsec_strerror.3
MLINKS+=ipsec_set_policy.3 ipsec_get_policylen.3 \
ipsec_set_policy.3 ipsec_dump_policy.3
diff --git a/lib/libipx/Makefile b/lib/libipx/Makefile
index 66f566a4bd04..b816ba306b74 100644
--- a/lib/libipx/Makefile
+++ b/lib/libipx/Makefile
@@ -6,4 +6,6 @@ SRCS= ipx_addr.c ipx_ntoa.c
MAN= ipx.3
MLINKS+=ipx.3 ipx_addr.3 ipx.3 ipx_ntoa.3
+WARNS?= 2
+
.include <bsd.lib.mk>
diff --git a/lib/libjail/Makefile b/lib/libjail/Makefile
index 678d59e08014..442274ae35dd 100644
--- a/lib/libjail/Makefile
+++ b/lib/libjail/Makefile
@@ -24,6 +24,4 @@ MLINKS+=jail.3 jailparam_free.3
CFLAGS+=-I${.CURDIR}
-WARNS?= 6
-
.include <bsd.lib.mk>
diff --git a/lib/libkiconv/Makefile b/lib/libkiconv/Makefile
index 2a0bd6a42121..4ba860ef903e 100644
--- a/lib/libkiconv/Makefile
+++ b/lib/libkiconv/Makefile
@@ -15,4 +15,6 @@ MLINKS+= kiconv.3 kiconv_add_xlat16_cspair.3 \
CFLAGS+= -I${.CURDIR}/../../sys
+WARNS?= 1
+
.include <bsd.lib.mk>
diff --git a/lib/libkvm/Makefile b/lib/libkvm/Makefile
index 47dc613ab7ed..0cb3ad7e3058 100644
--- a/lib/libkvm/Makefile
+++ b/lib/libkvm/Makefile
@@ -9,6 +9,8 @@ CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
CFLAGS+=-DSUN4V
.endif
+WARNS?= 0
+
SRCS= kvm.c kvm_${MACHINE_ARCH}.c kvm_cptime.c kvm_file.c kvm_getloadavg.c \
kvm_getswapinfo.c kvm_pcpu.c kvm_proc.c kvm_vnet.c
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "arm"
diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile
index 618a6f5b4274..ef7cc2b68032 100644
--- a/lib/libmagic/Makefile
+++ b/lib/libmagic/Makefile
@@ -20,6 +20,8 @@ MAGICPATH?= /usr/share/misc
CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H
CFLAGS+= -I${.CURDIR} -I${CONTRDIR}
+WARNS?= 1
+
CLEANFILES+= magic magic.mgc
FILES= magic magic.mgc
diff --git a/lib/libmd/Makefile b/lib/libmd/Makefile
index cf9d44345430..ba1ebc034175 100644
--- a/lib/libmd/Makefile
+++ b/lib/libmd/Makefile
@@ -8,6 +8,8 @@ SRCS= md2c.c md4c.c md5c.c md2hl.c md4hl.c md5hl.c \
sha256c.c sha256hl.c
INCS= md2.h md4.h md5.h ripemd.h sha.h sha256.h
+WARNS?= 0
+
MAN+= md2.3 md4.3 md5.3 ripemd.3 sha.3 sha256.3
MLINKS+=md2.3 MD2Init.3 md2.3 MD2Update.3 md2.3 MD2Final.3
MLINKS+=md2.3 MD2End.3 md2.3 MD2File.3 md2.3 MD2FileChunk.3
diff --git a/lib/libmilter/Makefile b/lib/libmilter/Makefile
index 75c93333fc5d..0e625d0812a4 100644
--- a/lib/libmilter/Makefile
+++ b/lib/libmilter/Makefile
@@ -27,6 +27,8 @@ SRCS+= main.c engine.c listener.c handler.c comm.c monitor.c smfi.c \
signal.c sm_gethost.c errstring.c strl.c worker.c
CLEANFILES+=sm_os.h
+WARNS?= 0
+
sm_os.h:
ln -sf ${SENDMAIL_DIR}/include/sm/os/sm_os_freebsd.h sm_os.h
diff --git a/lib/libmp/Makefile b/lib/libmp/Makefile
index 6c51c5787f09..a9001a10c375 100644
--- a/lib/libmp/Makefile
+++ b/lib/libmp/Makefile
@@ -8,7 +8,6 @@ MAN= libmp.3
INCS= mp.h
SRCS= mpasbn.c
-WARNS?= 6
CFLAGS+= -I${.CURDIR}/../../crypto
VERSION_DEF= ${.CURDIR}/../libc/Versions.def
diff --git a/lib/libncp/Makefile b/lib/libncp/Makefile
index 1a7ad6b679c8..d7870a029db4 100644
--- a/lib/libncp/Makefile
+++ b/lib/libncp/Makefile
@@ -11,4 +11,6 @@ SRCS= ncpl_subr.c ncpl_bind.c ncpl_queue.c ncpl_file.c ncpl_misc.c \
ncpl_net.c ncpl_rcfile.c ncpl_conn.c ncpl_nls.c ncpl_msg.c \
ncpl_rpc.c ncpl_crypt.c ipx.c sap.c
+WARNS?= 0
+
.include <bsd.lib.mk>
diff --git a/lib/libngatm/Makefile b/lib/libngatm/Makefile
index dfa33212eb1d..85294b0471df 100644
--- a/lib/libngatm/Makefile
+++ b/lib/libngatm/Makefile
@@ -5,7 +5,6 @@
LIB= ngatm
SHLIB_MAJOR= 4
MAN= libngatm.3 uniaddr.3 unifunc.3 unimsg.3 unisap.3 unistruct.3
-WARNS?= 6
# source of the library lives in contrib
SDIR= ${.CURDIR}/../../sys
diff --git a/lib/libopie/Makefile b/lib/libopie/Makefile
index 59406df0bc0f..01ee1b1b994e 100644
--- a/lib/libopie/Makefile
+++ b/lib/libopie/Makefile
@@ -26,6 +26,8 @@ CFLAGS+=-I${.CURDIR} -I${OPIE_DIST} -I${DIST_DIR} \
ACCESSFILE?= \"/etc/opieaccess\"
CFLAGS+= -DINSECURE_OVERRIDE -DPATH_ACCESS_FILE=${ACCESSFILE}
+WARNS?= 0
+
DPADD= ${LIBMD}
LDADD= -lmd
diff --git a/lib/libpam/modules/Makefile.inc b/lib/libpam/modules/Makefile.inc
index 248ad10b6361..c352f42c3f3e 100644
--- a/lib/libpam/modules/Makefile.inc
+++ b/lib/libpam/modules/Makefile.inc
@@ -6,7 +6,7 @@ NO_INSTALLLIB=
NO_PROFILE=
CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam
-WARNS?= 4
+WARNS?= 6
# This is nasty.
# For the static case, libpam.a depends on the modules.
diff --git a/lib/libpam/modules/pam_exec/Makefile b/lib/libpam/modules/pam_exec/Makefile
index 0cf4268a27a8..143f1a6cd6d2 100644
--- a/lib/libpam/modules/pam_exec/Makefile
+++ b/lib/libpam/modules/pam_exec/Makefile
@@ -4,6 +4,6 @@ LIB= pam_exec
SRCS= pam_exec.c
MAN= pam_exec.8
-WARNS?= 0
+WARNS?= 1
.include <bsd.lib.mk>
diff --git a/lib/libpam/modules/pam_krb5/Makefile b/lib/libpam/modules/pam_krb5/Makefile
index a376f7e2bcee..989e9aa59dfc 100644
--- a/lib/libpam/modules/pam_krb5/Makefile
+++ b/lib/libpam/modules/pam_krb5/Makefile
@@ -29,7 +29,6 @@ SRCS= pam_krb5.c
MAN= pam_krb5.8
.if defined(_FREEFALL_CONFIG)
CFLAGS+=-D_FREEFALL_CONFIG
-WARNS= 0
.endif
DPADD= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}
diff --git a/lib/libpam/modules/pam_radius/Makefile b/lib/libpam/modules/pam_radius/Makefile
index 88e4357a4b26..2fac8334e20e 100644
--- a/lib/libpam/modules/pam_radius/Makefile
+++ b/lib/libpam/modules/pam_radius/Makefile
@@ -27,7 +27,7 @@
LIB= pam_radius
SRCS= pam_radius.c
MAN= pam_radius.8
-WARNS= 0
+WARNS?= 3
DPADD= ${LIBRADIUS}
LDADD= -lradius
diff --git a/lib/libpam/modules/pam_ssh/Makefile b/lib/libpam/modules/pam_ssh/Makefile
index b638d8b052b0..d00652a8c215 100644
--- a/lib/libpam/modules/pam_ssh/Makefile
+++ b/lib/libpam/modules/pam_ssh/Makefile
@@ -10,7 +10,7 @@ SRCS= pam_ssh.c
# required when linking with a dynamic libssh
SRCS+= roaming_dummy.c
-WARNS?= 0
+WARNS?= 3
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
DPADD= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
diff --git a/lib/libpcap/Makefile b/lib/libpcap/Makefile
index 44ae23cd4b78..42540f565b1b 100644
--- a/lib/libpcap/Makefile
+++ b/lib/libpcap/Makefile
@@ -97,6 +97,8 @@ CFLAGS+=-DINET6
CFLAGS+=-DHAVE_NET_PFVAR_H
.endif
+WARNS?= 0
+
SHLIB_MAJOR=7
#
diff --git a/lib/libpmc/Makefile b/lib/libpmc/Makefile
index 6fcee91c3bed..09a23e3852db 100644
--- a/lib/libpmc/Makefile
+++ b/lib/libpmc/Makefile
@@ -5,8 +5,6 @@ LIB= pmc
SRCS= libpmc.c pmclog.c
INCS= pmc.h pmclog.h
-WARNS?= 6
-
MAN= pmc.3
MAN+= pmc_allocate.3
MAN+= pmc_attach.3
diff --git a/lib/libproc/Makefile b/lib/libproc/Makefile
index d6d29b3eaaf4..1c5be4e7abdc 100644
--- a/lib/libproc/Makefile
+++ b/lib/libproc/Makefile
@@ -13,8 +13,6 @@ CFLAGS+= -I. -I${.CURDIR}
SHLIB_MAJOR= 2
-WARNS?= 6
-
WITHOUT_MAN= yes
.include <bsd.lib.mk>
diff --git a/lib/libradius/Makefile b/lib/libradius/Makefile
index 5054ea0b9285..f49f65c0cfe0 100644
--- a/lib/libradius/Makefile
+++ b/lib/libradius/Makefile
@@ -33,6 +33,8 @@ CFLAGS+= -Wall
SHLIB_MAJOR= 4
MAN= libradius.3 radius.conf.5
+WARNS?= 3
+
.if ${MK_OPENSSL} == "no"
DPADD= ${LIBMD}
LDADD= -lmd
diff --git a/lib/librpcsec_gss/Makefile b/lib/librpcsec_gss/Makefile
index 90f7bd7210d9..cc14a7b41731 100644
--- a/lib/librpcsec_gss/Makefile
+++ b/lib/librpcsec_gss/Makefile
@@ -2,7 +2,6 @@
LIB= rpcsec_gss
SHLIB_MAJOR= 1
-WARNS?= 6
SRCS+= rpcsec_gss.c rpcsec_gss_prot.c rpcsec_gss_conf.c rpcsec_gss_misc.c \
svc_rpcsec_gss.c
diff --git a/lib/librt/Makefile b/lib/librt/Makefile
index 62c6b9731a12..e2ac3749fe34 100644
--- a/lib/librt/Makefile
+++ b/lib/librt/Makefile
@@ -6,6 +6,8 @@ CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}
CFLAGS+=-Winline -Wall -g
LDADD+=-lpthread
+WARNS?= 2
+
#MAN= libthr.3
SRCS+= aio.c mq.c sigev_thread.c timer.c
diff --git a/lib/libsbuf/Makefile b/lib/libsbuf/Makefile
index b166befc287e..5d96c0e983e6 100644
--- a/lib/libsbuf/Makefile
+++ b/lib/libsbuf/Makefile
@@ -3,7 +3,6 @@
LIB= sbuf
SHLIBDIR?= /lib
SRCS= subr_sbuf.c
-WARNS?= 2
.PATH: ${.CURDIR}/../../sys/kern
diff --git a/lib/libsm/Makefile b/lib/libsm/Makefile
index 38c780617e7d..ae76e91ccd1c 100644
--- a/lib/libsm/Makefile
+++ b/lib/libsm/Makefile
@@ -15,6 +15,8 @@ CFLAGS+=-DNETINET6
# User customizations to the sendmail build environment
CFLAGS+=${SENDMAIL_CFLAGS}
+WARNS?= 2
+
LIB= sm
SRCS+= sm_os.h
diff --git a/lib/libsmdb/Makefile b/lib/libsmdb/Makefile
index b796deb5acd7..976282c5d69f 100644
--- a/lib/libsmdb/Makefile
+++ b/lib/libsmdb/Makefile
@@ -9,6 +9,8 @@ CFLAGS+=-DNEWDB -DNOT_SENDMAIL
# User customizations to the sendmail build environment
CFLAGS+=${SENDMAIL_CFLAGS}
+WARNS?= 3
+
LIB= smdb
SRCS+= sm_os.h
diff --git a/lib/libsmutil/Makefile b/lib/libsmutil/Makefile
index 2e835fd76fdd..b7e5a694e4fb 100644
--- a/lib/libsmutil/Makefile
+++ b/lib/libsmutil/Makefile
@@ -9,6 +9,8 @@ CFLAGS+=-DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL
# User customizations to the sendmail build environment
CFLAGS+=${SENDMAIL_CFLAGS}
+WARNS?= 2
+
LIB= smutil
SRCS+= sm_os.h
diff --git a/lib/libstand/Makefile b/lib/libstand/Makefile
index 81b132dc7f81..1e4f9771abab 100644
--- a/lib/libstand/Makefile
+++ b/lib/libstand/Makefile
@@ -15,6 +15,8 @@ NO_PIC=
INCS= stand.h
MAN= libstand.3
+WARNS?= 0
+
CFLAGS+= -ffreestanding -Wformat
CFLAGS+= -I${.CURDIR}
diff --git a/lib/libtacplus/Makefile b/lib/libtacplus/Makefile
index 13ceb4327ef1..617f87737085 100644
--- a/lib/libtacplus/Makefile
+++ b/lib/libtacplus/Makefile
@@ -33,4 +33,6 @@ LDADD= -lmd
SHLIB_MAJOR= 4
MAN= libtacplus.3 tacplus.conf.5
+WARNS?= 2
+
.include <bsd.lib.mk>
diff --git a/lib/libthread_db/Makefile b/lib/libthread_db/Makefile
index 22868c31458f..7aaefd7cfd46 100644
--- a/lib/libthread_db/Makefile
+++ b/lib/libthread_db/Makefile
@@ -9,7 +9,6 @@ SRCS+= libpthread_md.c
SRCS+= libpthread_db.c
SRCS+= libthr_db.c
INCS= thread_db.h
-WARNS?= 6
CFLAGS+=-I. -I${.CURDIR}
SYM_MAPS+=${.CURDIR}/Symbol.map
diff --git a/lib/libufs/Makefile b/lib/libufs/Makefile
index 10726e4247e9..c9232ef54ad8 100644
--- a/lib/libufs/Makefile
+++ b/lib/libufs/Makefile
@@ -16,7 +16,7 @@ MLINKS+= ufs_disk_close.3 ufs_disk_fillout.3
MLINKS+= ufs_disk_close.3 ufs_disk_fillout_blank.3
MLINKS+= ufs_disk_close.3 ufs_disk_write.3
-WARNS?= 2
+WARNS?= 3
CFLAGS+= -D_LIBUFS
.if defined(LIBUFS_DEBUG)
diff --git a/lib/libugidfw/Makefile b/lib/libugidfw/Makefile
index 23c5ea7aaf5b..2e0956575522 100644
--- a/lib/libugidfw/Makefile
+++ b/lib/libugidfw/Makefile
@@ -5,6 +5,8 @@ SHLIB_MAJOR= 4
SRCS= ugidfw.c
INCS= ugidfw.h
+WARNS?= 2
+
MAN+= bsde_get_rule.3 bsde_get_rule_count.3 bsde_parse_rule.3 \
bsde_rule_to_string.3 libugidfw.3
diff --git a/lib/libulog/Makefile b/lib/libulog/Makefile
index d6bd8a35ef4c..c05e156da3ff 100644
--- a/lib/libulog/Makefile
+++ b/lib/libulog/Makefile
@@ -33,8 +33,6 @@ MLINKS+=ulog_endutxent.3 endutxent.3 \
ulog_pututxline.3 pututxline.3 \
ulog_setutxent.3 setutxent.3
-WARNS?= 6
-
VERSION_DEF= ${.CURDIR}/../libc/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
diff --git a/lib/libusb/Makefile b/lib/libusb/Makefile
index b06f7746082e..7405ef33054f 100644
--- a/lib/libusb/Makefile
+++ b/lib/libusb/Makefile
@@ -16,6 +16,8 @@ MAN= libusb.3 libusb20.3
MKLINT= no
NOGCCERROR=
+WARNS?= 2
+
MLINKS+= libusb.3 usb.3
# libusb 0.1 compat
diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile
index 29336498f590..eaf6120c0a70 100644
--- a/lib/libutil/Makefile
+++ b/lib/libutil/Makefile
@@ -16,8 +16,6 @@ SRCS= _secure_path.c auth.c expand_number.c flopen.c fparseln.c gr_util.c \
stub.c trimdomain.c uucplock.c
INCS= libutil.h login_cap.h
-WARNS?= 6
-
CFLAGS+= -DLIBC_SCCS
.if ${MK_INET6_SUPPORT} != "no"
diff --git a/lib/libvgl/Makefile b/lib/libvgl/Makefile
index a379bd0b2938..dfc4e81f33b8 100644
--- a/lib/libvgl/Makefile
+++ b/lib/libvgl/Makefile
@@ -5,6 +5,7 @@ CFLAGS+=-Wall -I${.CURDIR}
SRCS= main.c simple.c bitmap.c text.c mouse.c keyboard.c
INCS= vgl.h
MAN= vgl.3
+WARNS?= 2
MLINKS+= vgl.3 VGLBitmapAllocateBits.3 \
vgl.3 VGLBitmapCopy.3 \
vgl.3 VGLBitmapCreate.3 \
diff --git a/lib/libwrap/Makefile b/lib/libwrap/Makefile
index 456582765f57..2ae6821d7757 100644
--- a/lib/libwrap/Makefile
+++ b/lib/libwrap/Makefile
@@ -28,6 +28,8 @@ CFLAGS+= -DUSE_GETDOMAIN
CFLAGS+=-DINET6
.endif
+WARNS?= 0
+
SRCS= clean_exit.c diag.c eval.c fix_options.c fromhost.c \
hosts_access.c hosts_ctl.c misc.c myvsyslog.c options.c \
percent_m.c percent_x.c refuse.c rfc931.c shell_cmd.c \
diff --git a/lib/liby/Makefile b/lib/liby/Makefile
index b7a3aff578d1..34939452dd75 100644
--- a/lib/liby/Makefile
+++ b/lib/liby/Makefile
@@ -1,7 +1,9 @@
# $FreeBSD$
-LIB= y
+LIB= y
SRCS= main.c yyerror.c
NO_PIC=
+WARNS?= 1
+
.include <bsd.lib.mk>
diff --git a/lib/libypclnt/Makefile b/lib/libypclnt/Makefile
index 53d6a6377542..5a3ecb42aa2c 100644
--- a/lib/libypclnt/Makefile
+++ b/lib/libypclnt/Makefile
@@ -12,7 +12,6 @@ CLEANFILES+= ${GENSRCS}
INCS= ypclnt.h
CFLAGS+= -I.
-WARNS?= 5
GENSRCS=yp.h \
yp_clnt.c \
diff --git a/lib/libz/Makefile b/lib/libz/Makefile
index 63383b4d97b6..595b4f3d5460 100644
--- a/lib/libz/Makefile
+++ b/lib/libz/Makefile
@@ -13,6 +13,8 @@ MAN= zlib.3
CFLAGS+= -DHAS_snprintf -DHAS_vsnprintf
+WARNS?= 3
+
CLEANFILES+= example.o example foo.gz minigzip.o minigzip
SRCS = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c trees.c \
diff --git a/lib/ncurses/Makefile.inc b/lib/ncurses/Makefile.inc
index 89c6348a5d85..5c1487cbc760 100644
--- a/lib/ncurses/Makefile.inc
+++ b/lib/ncurses/Makefile.inc
@@ -2,4 +2,6 @@
# This is to include src/lib/Makefile.inc
+WARNS?= 3
+
.include "../Makefile.inc"