From e7302aa08274de307cd2c3345fc64c56dbe56e21 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 10 Apr 2010 22:41:24 +0200 Subject: [PATCH] Add -Wold-style-definition to WARNS >= 3 and fix the resulting fallout. * Ansify a function in mount_smbfs(8). * Lower the WARNS of some contrib/ stuff from 3 to 2. --- contrib/smbfs/mount_smbfs/getmntopts.c | 7 ++----- lib/libsmdb/Makefile | 2 +- lib/libz/Makefile | 2 +- secure/usr.bin/openssl/Makefile | 2 +- secure/usr.bin/ssh/Makefile | 2 +- share/mk/bsd.sys.mk | 3 ++- usr.sbin/tcpdump/Makefile | 2 +- 7 files changed, 9 insertions(+), 11 deletions(-) diff --git a/contrib/smbfs/mount_smbfs/getmntopts.c b/contrib/smbfs/mount_smbfs/getmntopts.c index 895b61c4e6..360225b7d6 100644 --- a/contrib/smbfs/mount_smbfs/getmntopts.c +++ b/contrib/smbfs/mount_smbfs/getmntopts.c @@ -51,11 +51,8 @@ static const char rcsid[] = int getmnt_silent = 0; void -getmntopts(options, m0, flagp, altflagp) - const char *options; - const struct mntopt *m0; - int *flagp; - int *altflagp; +getmntopts(const char *options, const struct mntopt *m0, int *flagp, + int *altflagp) { const struct mntopt *m; int negative, len; diff --git a/lib/libsmdb/Makefile b/lib/libsmdb/Makefile index 9fffad3775..2dcf68b04b 100644 --- a/lib/libsmdb/Makefile +++ b/lib/libsmdb/Makefile @@ -15,7 +15,7 @@ LIB= smdb SRCS+= sm_os.h SRCS+= smdb.c smdb1.c smdb2.c smndbm.c CLEANFILES+=sm_os.h -WARNS?= 3 +WARNS?= 2 INTERNALLIB= true diff --git a/lib/libz/Makefile b/lib/libz/Makefile index 88a6dfb7a9..b9d90a0d53 100644 --- a/lib/libz/Makefile +++ b/lib/libz/Makefile @@ -5,7 +5,7 @@ LIB= z MAN= zlib.3 -WARNS?= 3 +WARNS?= 2 PATCHES!= echo ${.CURDIR}/patches/*.patch CONTRIBDIR= ${.CURDIR}/../../contrib/zlib-1.2 diff --git a/secure/usr.bin/openssl/Makefile b/secure/usr.bin/openssl/Makefile index 416e71265d..b900f0dcd5 100644 --- a/secure/usr.bin/openssl/Makefile +++ b/secure/usr.bin/openssl/Makefile @@ -3,7 +3,7 @@ PROG= xopenssl PROGNAME= openssl -WARNS?= 3 +WARNS?= 2 DPADD= ${LIBSSL} ${LIBCRYPTO} LDADD= -lssl -lcrypto diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile index 4f2f03bdea..03acc2e042 100644 --- a/secure/usr.bin/ssh/Makefile +++ b/secure/usr.bin/ssh/Makefile @@ -6,7 +6,7 @@ PROG= ssh LINKS= ${BINDIR}/ssh ${BINDIR}/slogin MAN= ssh.1 ssh_config.5 MLINKS= ssh.1 slogin.1 -WARNS?= 3 +WARNS?= 2 SRCS= ssh.c readconf.c clientloop.c sshtty.c \ sshconnect.c sshconnect1.c sshconnect2.c mux.c \ diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 586d5d004c..ba88fabcaa 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -33,7 +33,8 @@ CWARNFLAGS += -Wall . endif . if ${WARNS} >= 3 CWARNFLAGS += -W -Wno-unused-parameter -Wstrict-prototypes\ - -Wmissing-prototypes -Wpointer-arith + -Wmissing-prototypes -Wpointer-arith\ + -Wold-style-definition . endif . if ${WARNS} >= 4 CWARNFLAGS += -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch\ diff --git a/usr.sbin/tcpdump/Makefile b/usr.sbin/tcpdump/Makefile index 44f2ad77ad..e6816db9c2 100644 --- a/usr.sbin/tcpdump/Makefile +++ b/usr.sbin/tcpdump/Makefile @@ -61,7 +61,7 @@ DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto CFLAGS+= -I${DESTDIR}/usr/include/openssl -DHAVE_LIBCRYPTO -DHAVE_OPENSSL_EVP_H .endif -WARNS?= 3 +WARNS?= 2 version.c: ${TCPDUMP_DISTDIR}/VERSION @rm -f $@ -- 2.41.0