Deal with xdrproc_t casts. Make these compile cleanly with WARNS=2
(but I haven't turned it on)
This commit is contained in:
parent
47f0776134
commit
422e293c7f
@ -5,6 +5,7 @@ MAN= rpc.statd.8
|
||||
SRCS= file.c sm_inter_svc.c sm_inter.h statd.c procs.c
|
||||
|
||||
CFLAGS+= -I.
|
||||
#WARNS?= 2
|
||||
|
||||
DPADD= ${LIBRPCSVC}
|
||||
LDADD= -lrpcsvc
|
||||
|
@ -239,7 +239,8 @@ static int notify_one_host(char *hostname)
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if (clnt_call(cli, SM_NOTIFY, xdr_stat_chge, &arg, xdr_void, &dummy, timeout)
|
||||
if (clnt_call(cli, SM_NOTIFY, (xdrproc_t)xdr_stat_chge, &arg,
|
||||
(xdrproc_t)xdr_void, &dummy, timeout)
|
||||
!= RPC_SUCCESS)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to contact rpc.statd at host %s", hostname);
|
||||
|
@ -409,8 +409,8 @@ void *sm_notify_1_svc(stat_chge *arg, struct svc_req *req __unused)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (clnt_call(cli, lp->notifyProc, xdr_sm_status, &tx_arg, xdr_void,
|
||||
&dummy, timeout) != RPC_SUCCESS)
|
||||
if (clnt_call(cli, lp->notifyProc, (xdrproc_t)xdr_sm_status, &tx_arg,
|
||||
(xdrproc_t)xdr_void, &dummy, timeout) != RPC_SUCCESS)
|
||||
{
|
||||
syslog(LOG_ERR, "Failed to call rpc.statd client at host %s",
|
||||
lp->notifyHost);
|
||||
|
@ -5,4 +5,6 @@ PROG= rpc.umntall
|
||||
MAN= rpc.umntall.8
|
||||
SRCS= rpc.umntall.c mounttab.c
|
||||
|
||||
#WARNS?= 2
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -182,8 +182,9 @@ do_umntall(char *hostname) {
|
||||
clp->cl_auth = authunix_create_default();
|
||||
try.tv_sec = 3;
|
||||
try.tv_usec = 0;
|
||||
clnt_stat = clnt_call(clp, RPCMNT_UMNTALL, xdr_void, (caddr_t)0,
|
||||
xdr_void, (caddr_t)0, try);
|
||||
clnt_stat = clnt_call(clp, RPCMNT_UMNTALL,
|
||||
(xdrproc_t)xdr_void, (caddr_t)0,
|
||||
(xdrproc_t)xdr_void, (caddr_t)0, try);
|
||||
if (clnt_stat != RPC_SUCCESS)
|
||||
warnx("%s: %s", hostname, clnt_sperror(clp, "RPCMNT_UMNTALL"));
|
||||
auth_destroy(clp->cl_auth);
|
||||
@ -208,8 +209,8 @@ do_umount(char *hostname, char *dirp) {
|
||||
clp->cl_auth = authsys_create_default();
|
||||
try.tv_sec = 3;
|
||||
try.tv_usec = 0;
|
||||
clnt_stat = clnt_call(clp, RPCMNT_UMOUNT, xdr_dir, dirp,
|
||||
xdr_void, (caddr_t)0, try);
|
||||
clnt_stat = clnt_call(clp, RPCMNT_UMOUNT, (xdrproc_t)xdr_dir, dirp,
|
||||
(xdrproc_t)xdr_void, (caddr_t)0, try);
|
||||
if (clnt_stat != RPC_SUCCESS)
|
||||
warnx("%s: %s", hostname, clnt_sperror(clp, "RPCMNT_UMOUNT"));
|
||||
auth_destroy(clp->cl_auth);
|
||||
|
Loading…
Reference in New Issue
Block a user