From ce5b56a99d27b95380834a6c54a8aeb01e96a8b1 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 23 Mar 2012 22:06:37 +0100 Subject: [PATCH] rpc.yppasswdd(8): Fix some warnings and raise WARNS to 5. --- libexec/ypxfr/ypxfr_extern.h | 3 +-- libexec/ypxfr/ypxfr_misc.c | 3 +-- usr.sbin/rpc.yppasswdd/Makefile | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/libexec/ypxfr/ypxfr_extern.h b/libexec/ypxfr/ypxfr_extern.h index 2fa8eb3890..101236c6be 100644 --- a/libexec/ypxfr/ypxfr_extern.h +++ b/libexec/ypxfr/ypxfr_extern.h @@ -30,7 +30,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/libexec/ypxfr/ypxfr_extern.h,v 1.7.2.1 2002/02/15 00:46:54 des Exp $ - * $DragonFly: src/libexec/ypxfr/ypxfr_extern.h,v 1.3 2007/11/25 14:48:30 swildner Exp $ */ #include #include @@ -50,7 +49,7 @@ extern int debug; extern enum ypstat yp_errno; extern void yp_error(const char *, ...); extern int _yp_check(char **); -extern char *ypxfrerr_string(ypxfrstat); +extern const char *ypxfrerr_string(ypxfrstat); extern DB *yp_open_db_rw(const char *, const char *, const int); extern void yp_init_dbs(void); extern int yp_put_record(DB *, DBT *, DBT *, int); diff --git a/libexec/ypxfr/ypxfr_misc.c b/libexec/ypxfr/ypxfr_misc.c index 839129f153..af6b86decd 100644 --- a/libexec/ypxfr/ypxfr_misc.c +++ b/libexec/ypxfr/ypxfr_misc.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/libexec/ypxfr/ypxfr_misc.c,v 1.9.2.2 2002/02/15 00:46:54 des Exp $ - * $DragonFly: src/libexec/ypxfr/ypxfr_misc.c,v 1.2 2003/06/17 04:27:08 dillon Exp $ */ #include @@ -44,7 +43,7 @@ struct dom_binding {}; #include #include "ypxfr_extern.h" -char * +const char * ypxfrerr_string(ypxfrstat code) { switch (code) { diff --git a/usr.sbin/rpc.yppasswdd/Makefile b/usr.sbin/rpc.yppasswdd/Makefile index 79ff4de946..5451c2c813 100644 --- a/usr.sbin/rpc.yppasswdd/Makefile +++ b/usr.sbin/rpc.yppasswdd/Makefile @@ -1,5 +1,4 @@ # $FreeBSD: src/usr.sbin/rpc.yppasswdd/Makefile,v 1.22 2007/11/20 02:07:30 jb Exp $ -# $DragonFly: src/usr.sbin/rpc.yppasswdd/Makefile,v 1.2 2003/06/17 04:30:02 dillon Exp $ RPCDIR= ${DESTDIR}/usr/include/rpcsvc @@ -15,7 +14,7 @@ SRCS= util.c yp_access.c yp_dblookup.c yp_dbwrite.c \ GENSRCS=yp.h yp_clnt.c yppasswd.h yppasswd_private.h yppasswd_private_svc.c \ yppasswd_private_xdr.c yppasswd_svc.c -WARNS?= 0 +WARNS?= 5 CFLAGS+= -fno-strict-aliasing CFLAGS+= -I${.CURDIR}/../../usr.sbin/vipw \ -I${.CURDIR}/../../usr.sbin/ypserv \ -- 2.41.0