aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mountd
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2003-10-26 05:58:21 +0000
committerPeter Wemm <peter@FreeBSD.org>2003-10-26 05:58:21 +0000
commit389b84465208a6496b39e17a90a3741f155cc51c (patch)
tree71d902c830098a2813c2bacdafedfac3865cd517 /usr.sbin/mountd
parent3bda2f43af33ff578d70919479e2469b980cc527 (diff)
downloadsrc-389b84465208a6496b39e17a90a3741f155cc51c.tar.gz
src-389b84465208a6496b39e17a90a3741f155cc51c.zip
Use -fno-builtin-log. Fix svc_sendreply() missing required casts.
It is now WARNS=2 clean again.
Notes
Notes: svn path=/head/; revision=121556
Diffstat (limited to 'usr.sbin/mountd')
-rw-r--r--usr.sbin/mountd/Makefile3
-rw-r--r--usr.sbin/mountd/mountd.c27
2 files changed, 17 insertions, 13 deletions
diff --git a/usr.sbin/mountd/Makefile b/usr.sbin/mountd/Makefile
index d9b363b2a6f2..308a326845e9 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 <bsd.prog.mk>
diff --git a/usr.sbin/mountd/mountd.c b/usr.sbin/mountd/mountd.c
index 249ab868af9c..eb2a7dd62eec 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,