summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mountd
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-10-26 05:58:21 +0000
committerpeter <peter@FreeBSD.org>2003-10-26 05:58:21 +0000
commit18ddddadd0b53c5975d80e5064c1228aabd325b8 (patch)
tree71d902c830098a2813c2bacdafedfac3865cd517 /usr.sbin/mountd
parent84984af7251e310f7a27132c66f08a002917cbe3 (diff)
downloadFreeBSD-src-18ddddadd0b53c5975d80e5064c1228aabd325b8.zip
FreeBSD-src-18ddddadd0b53c5975d80e5064c1228aabd325b8.tar.gz
Use -fno-builtin-log. Fix svc_sendreply() missing required casts.
It is now WARNS=2 clean again.
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 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 <bsd.prog.mk>
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,
OpenPOWER on IntegriCloud