From 18ddddadd0b53c5975d80e5064c1228aabd325b8 Mon Sep 17 00:00:00 2001 From: peter Date: Sun, 26 Oct 2003 05:58:21 +0000 Subject: Use -fno-builtin-log. Fix svc_sendreply() missing required casts. It is now WARNS=2 clean again. --- usr.sbin/mountd/Makefile | 3 ++- usr.sbin/mountd/mountd.c | 27 +++++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/usr.sbin/mountd/Makefile b/usr.sbin/mountd/Makefile index d9b363b..308a326 100644 --- a/usr.sbin/mountd/Makefile +++ b/usr.sbin/mountd/Makefile @@ -4,6 +4,7 @@ PROG= mountd MAN= exports.5 netgroup.5 mountd.8 -WARNS?= 0 +WARNS?= 2 +CFLAGS+= -fno-builtin-log .include diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c index 249ab86..eb2a7dd 100644 --- a/usr.sbin/mountd/mountd.c +++ b/usr.sbin/mountd/mountd.c @@ -549,7 +549,7 @@ mntsrv(rqstp, transp) ai = NULL; switch (rqstp->rq_proc) { case NULLPROC: - if (!svc_sendreply(transp, xdr_void, NULL)) + if (!svc_sendreply(transp, (xdrproc_t)xdr_void, NULL)) syslog(LOG_ERR, "can't send reply"); return; case RPCMNT_MOUNT: @@ -560,7 +560,7 @@ mntsrv(rqstp, transp) svcerr_weakauth(transp); return; } - if (!svc_getargs(transp, xdr_dir, rpcpath)) { + if (!svc_getargs(transp, (xdrproc_t)xdr_dir, rpcpath)) { syslog(LOG_NOTICE, "undecodable mount request from %s", numerichost); svcerr_decode(transp); @@ -596,7 +596,7 @@ mntsrv(rqstp, transp) (defset && scan_tree(ep->ex_defdir, saddr) == 0 && scan_tree(ep->ex_dirl, saddr) == 0))) { if (bad) { - if (!svc_sendreply(transp, xdr_long, + if (!svc_sendreply(transp, (xdrproc_t)xdr_long, (caddr_t)&bad)) syslog(LOG_ERR, "can't send reply"); sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); @@ -612,13 +612,14 @@ mntsrv(rqstp, transp) if (getfh(dirpath, (fhandle_t *)&fhr.fhr_fh) < 0) { bad = errno; syslog(LOG_ERR, "can't get fh for %s", dirpath); - if (!svc_sendreply(transp, xdr_long, + if (!svc_sendreply(transp, (xdrproc_t)xdr_long, (caddr_t)&bad)) syslog(LOG_ERR, "can't send reply"); sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); return; } - if (!svc_sendreply(transp, xdr_fhs, (caddr_t)&fhr)) + if (!svc_sendreply(transp, (xdrproc_t)xdr_fhs, + (caddr_t)&fhr)) syslog(LOG_ERR, "can't send reply"); if (!lookup_failed) add_mlist(host, dirpath); @@ -637,12 +638,13 @@ mntsrv(rqstp, transp) numerichost, dirpath); } - if (bad && !svc_sendreply(transp, xdr_long, (caddr_t)&bad)) + if (bad && !svc_sendreply(transp, (xdrproc_t)xdr_long, + (caddr_t)&bad)) syslog(LOG_ERR, "can't send reply"); sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); return; case RPCMNT_DUMP: - if (!svc_sendreply(transp, xdr_mlist, (caddr_t)NULL)) + if (!svc_sendreply(transp, (xdrproc_t)xdr_mlist, (caddr_t)NULL)) syslog(LOG_ERR, "can't send reply"); else if (log) syslog(LOG_NOTICE, @@ -657,7 +659,7 @@ mntsrv(rqstp, transp) svcerr_weakauth(transp); return; } - if (!svc_getargs(transp, xdr_dir, rpcpath)) { + if (!svc_getargs(transp, (xdrproc_t)xdr_dir, rpcpath)) { syslog(LOG_NOTICE, "undecodable umount request from %s", numerichost); svcerr_decode(transp); @@ -668,7 +670,7 @@ mntsrv(rqstp, transp) "for non existent path %s", numerichost, dirpath); } - if (!svc_sendreply(transp, xdr_void, (caddr_t)NULL)) + if (!svc_sendreply(transp, (xdrproc_t)xdr_void, (caddr_t)NULL)) syslog(LOG_ERR, "can't send reply"); if (!lookup_failed) del_mlist(host, dirpath); @@ -686,7 +688,7 @@ mntsrv(rqstp, transp) svcerr_weakauth(transp); return; } - if (!svc_sendreply(transp, xdr_void, (caddr_t)NULL)) + if (!svc_sendreply(transp, (xdrproc_t)xdr_void, (caddr_t)NULL)) syslog(LOG_ERR, "can't send reply"); if (!lookup_failed) del_mlist(host, NULL); @@ -697,8 +699,9 @@ mntsrv(rqstp, transp) numerichost); return; case RPCMNT_EXPORT: - if (!svc_sendreply(transp, xdr_explist, (caddr_t)NULL)) - if (!svc_sendreply(transp, xdr_explist_brief, (caddr_t)NULL)) + if (!svc_sendreply(transp, (xdrproc_t)xdr_explist, (caddr_t)NULL)) + if (!svc_sendreply(transp, (xdrproc_t)xdr_explist_brief, + (caddr_t)NULL)) syslog(LOG_ERR, "can't send reply"); if (log) syslog(LOG_NOTICE, -- cgit v1.1