mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2005-01-09 Joel Sherrill <joel@oarcorp.com>
* librpc/include/rpc/clnt.h, librpc/src/rpc/authunix_prot.c, librpc/src/rpc/clnt_tcp.c, librpc/src/rpc/pmap_prot2.c, librpc/src/rpc/pmap_rmt.c, librpc/src/rpc/rtems_portmapper.c, librpc/src/rpc/svc_simple.c: Fix warnings.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2005-01-09 Joel Sherrill <joel@oarcorp.com>
|
||||
|
||||
* librpc/include/rpc/clnt.h, librpc/src/rpc/authunix_prot.c,
|
||||
librpc/src/rpc/clnt_tcp.c, librpc/src/rpc/pmap_prot2.c,
|
||||
librpc/src/rpc/pmap_rmt.c, librpc/src/rpc/rtems_portmapper.c,
|
||||
librpc/src/rpc/svc_simple.c: Fix warnings.
|
||||
|
||||
2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
|
||||
|
||||
* librpc/include/rpc/auth_des.h, librpc/include/rpc/xdr.h,
|
||||
|
||||
@@ -159,11 +159,11 @@ typedef struct __rpc_client {
|
||||
* struct timeval timeout;
|
||||
*/
|
||||
#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
|
||||
((*(rh)->cl_ops->cl_call)(rh, proc, xargs, (caddr_t)argsp, \
|
||||
xres, (caddr_t)resp, secs))
|
||||
((*(rh)->cl_ops->cl_call)(rh, proc, (xdrproc_t)xargs, (caddr_t)argsp, \
|
||||
(xdrproc_t) xres, (caddr_t)resp, secs))
|
||||
#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
|
||||
((*(rh)->cl_ops->cl_call)(rh, proc, xargs, (caddr_t)argsp, \
|
||||
xres, (caddr_t)resp, secs))
|
||||
((*(rh)->cl_ops->cl_call)(rh, proc, (xdrproc_t) xargs, (caddr_t)argsp, \
|
||||
(xdrproc_t) xres, (caddr_t)resp, secs))
|
||||
|
||||
/*
|
||||
* void
|
||||
@@ -189,8 +189,8 @@ typedef struct __rpc_client {
|
||||
* xdrproc_t xres;
|
||||
* caddr_t resp;
|
||||
*/
|
||||
#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
|
||||
#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp))
|
||||
#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,(xdrproc_t)xres,resp))
|
||||
#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,(xdrproc_t)xres,resp))
|
||||
|
||||
/*
|
||||
* bool_t
|
||||
|
||||
@@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p)
|
||||
&& xdr_int(xdrs, &(p->aup_uid))
|
||||
&& xdr_int(xdrs, &(p->aup_gid))
|
||||
&& xdr_array(xdrs, (caddr_t *)&(p->aup_gids),
|
||||
&(p->aup_len), NGRPS, sizeof(int), xdr_int) ) {
|
||||
&(p->aup_len), NGRPS, sizeof(int), (xdrproc_t) xdr_int) ) {
|
||||
return (TRUE);
|
||||
}
|
||||
return (FALSE);
|
||||
|
||||
@@ -288,7 +288,7 @@ call_again:
|
||||
while (TRUE) {
|
||||
reply_msg.acpted_rply.ar_verf = _null_auth;
|
||||
reply_msg.acpted_rply.ar_results.where = NULL;
|
||||
reply_msg.acpted_rply.ar_results.proc = xdr_void;
|
||||
reply_msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_void;
|
||||
if (! xdrrec_skiprecord(xdrs))
|
||||
return (ct->ct_error.re_status);
|
||||
/* now decode and validate the response header */
|
||||
|
||||
@@ -111,7 +111,7 @@ xdr_pmaplist(xdrs, rp)
|
||||
if (freeing)
|
||||
next = &((*rp)->pml_next);
|
||||
if (! xdr_reference(xdrs, (caddr_t *)rp,
|
||||
(u_int)sizeof(struct pmaplist), xdr_pmap))
|
||||
(u_int)sizeof(struct pmaplist), (xdrproc_t) xdr_pmap))
|
||||
return (FALSE);
|
||||
rp = (freeing) ? next : &((*rp)->pml_next);
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ xdr_rmtcallres(xdrs, crp)
|
||||
|
||||
port_ptr = (caddr_t)crp->port_ptr;
|
||||
if (xdr_reference(xdrs, &port_ptr, sizeof (u_long),
|
||||
xdr_u_long) && xdr_u_long(xdrs, &crp->resultslen)) {
|
||||
(xdrproc_t) xdr_u_long) && xdr_u_long(xdrs, &crp->resultslen)) {
|
||||
crp->port_ptr = (u_long *)port_ptr;
|
||||
return ((*(crp->xdr_results))(xdrs, crp->results_ptr));
|
||||
}
|
||||
@@ -348,7 +348,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
recv_again:
|
||||
msg.acpted_rply.ar_verf = _null_auth;
|
||||
msg.acpted_rply.ar_results.where = (caddr_t)&r;
|
||||
msg.acpted_rply.ar_results.proc = xdr_rmtcallres;
|
||||
msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_rmtcallres;
|
||||
/* XXX we know the other bits are still clear */
|
||||
FD_SET(sock, fds);
|
||||
tv = t; /* for select() that copies back */
|
||||
@@ -394,7 +394,7 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult)
|
||||
/* otherwise, we just ignore the errors ... */
|
||||
}
|
||||
xdrs->x_op = XDR_FREE;
|
||||
msg.acpted_rply.ar_results.proc = xdr_void;
|
||||
msg.acpted_rply.ar_results.proc = (xdrproc_t) xdr_void;
|
||||
(void)xdr_replymsg(xdrs, &msg);
|
||||
(void)(*xresults)(xdrs, resultsp);
|
||||
xdr_destroy(xdrs);
|
||||
|
||||
@@ -159,7 +159,8 @@ static void reg_service(
|
||||
/*
|
||||
* Null proc call
|
||||
*/
|
||||
if ((!svc_sendreply(xprt, xdr_void, NULL)) && debugging) {
|
||||
if ((!svc_sendreply(xprt, (xdrproc_t) xdr_void, NULL)) &&
|
||||
debugging) {
|
||||
abort();
|
||||
}
|
||||
break;
|
||||
@@ -168,7 +169,7 @@ static void reg_service(
|
||||
/*
|
||||
* Set a program,version to port mapping
|
||||
*/
|
||||
if (!svc_getargs(xprt, xdr_pmap, (caddr_t)®))
|
||||
if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)®))
|
||||
svcerr_decode(xprt);
|
||||
else {
|
||||
/*
|
||||
@@ -204,7 +205,7 @@ static void reg_service(
|
||||
ans = 1;
|
||||
}
|
||||
done:
|
||||
if ((!svc_sendreply(xprt, xdr_long, (caddr_t)&ans)) &&
|
||||
if ((!svc_sendreply(xprt, (xdrproc_t) xdr_long, (caddr_t)&ans)) &&
|
||||
debugging) {
|
||||
fprintf(stderr, "svc_sendreply\n");
|
||||
abort();
|
||||
@@ -216,7 +217,7 @@ static void reg_service(
|
||||
/*
|
||||
* Remove a program,version to port mapping.
|
||||
*/
|
||||
if (!svc_getargs(xprt, xdr_pmap, (caddr_t)®))
|
||||
if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)®))
|
||||
svcerr_decode(xprt);
|
||||
else {
|
||||
ans = 0;
|
||||
@@ -238,7 +239,7 @@ static void reg_service(
|
||||
prevpml->pml_next = pml;
|
||||
free(t);
|
||||
}
|
||||
if ((!svc_sendreply(xprt, xdr_long, (caddr_t)&ans)) &&
|
||||
if ((!svc_sendreply(xprt, (xdrproc_t) xdr_long, (caddr_t)&ans)) &&
|
||||
debugging) {
|
||||
fprintf(stderr, "svc_sendreply\n");
|
||||
abort();
|
||||
@@ -250,7 +251,7 @@ static void reg_service(
|
||||
/*
|
||||
* Lookup the mapping for a program,version and return its port
|
||||
*/
|
||||
if (!svc_getargs(xprt, xdr_pmap, (caddr_t)®))
|
||||
if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)®))
|
||||
svcerr_decode(xprt);
|
||||
else {
|
||||
fnd = find_service(reg.pm_prog, reg.pm_vers, reg.pm_prot);
|
||||
@@ -258,7 +259,7 @@ static void reg_service(
|
||||
port = fnd->pml_map.pm_port;
|
||||
else
|
||||
port = 0;
|
||||
if ((!svc_sendreply(xprt, xdr_long, (caddr_t)&port)) &&
|
||||
if ((!svc_sendreply(xprt, (xdrproc_t) xdr_long, (caddr_t)&port)) &&
|
||||
debugging) {
|
||||
fprintf(stderr, "svc_sendreply\n");
|
||||
abort();
|
||||
@@ -270,10 +271,10 @@ static void reg_service(
|
||||
/*
|
||||
* Return the current set of mapped program,version
|
||||
*/
|
||||
if (!svc_getargs(xprt, xdr_void, NULL))
|
||||
if (!svc_getargs(xprt, (xdrproc_t) xdr_void, NULL))
|
||||
svcerr_decode(xprt);
|
||||
else {
|
||||
if ((!svc_sendreply(xprt, xdr_pmaplist,
|
||||
if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist,
|
||||
(caddr_t)&pmaplist)) && debugging) {
|
||||
fprintf(stderr, "svc_sendreply\n");
|
||||
abort();
|
||||
@@ -419,7 +420,7 @@ callit(
|
||||
timeout.tv_sec = 5;
|
||||
timeout.tv_usec = 0;
|
||||
a.rmt_args.args = buf;
|
||||
if (!svc_getargs(xprt, xdr_rmtcall_args, (caddr_t)&a))
|
||||
if (!svc_getargs(xprt, (xdrproc_t) xdr_rmtcall_args, (caddr_t)&a))
|
||||
return;
|
||||
if ((pml = find_service(a.rmt_prog, a.rmt_vers, IPPROTO_UDP)) == NULL)
|
||||
return;
|
||||
@@ -445,7 +446,7 @@ callit(
|
||||
a.rmt_port = (u_long)port;
|
||||
if (clnt_call(client, a.rmt_proc, xdr_opaque_parms, &a,
|
||||
xdr_len_opaque_parms, &a, timeout) == RPC_SUCCESS) {
|
||||
svc_sendreply(xprt, xdr_rmtcall_result, (caddr_t)&a);
|
||||
svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (caddr_t)&a);
|
||||
}
|
||||
AUTH_DESTROY(client->cl_auth);
|
||||
clnt_destroy(client);
|
||||
|
||||
@@ -118,7 +118,7 @@ universal(
|
||||
* enforce "procnum 0 is echo" convention
|
||||
*/
|
||||
if (rqstp->rq_proc == NULLPROC) {
|
||||
if (svc_sendreply(atransp, xdr_void, NULL) == FALSE) {
|
||||
if (svc_sendreply(atransp, (xdrproc_t) xdr_void, NULL) == FALSE) {
|
||||
(void) fprintf(stderr, "xxx\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -135,7 +135,8 @@ universal(
|
||||
return;
|
||||
}
|
||||
outdata = (*(lpl->p_progname))(xdrbuf);
|
||||
if (outdata == NULL && lpl->p_outproc != xdr_void)
|
||||
if (outdata == NULL &&
|
||||
lpl->p_outproc != (xdrproc_t) xdr_void)
|
||||
/* there was an error */
|
||||
return;
|
||||
if (!svc_sendreply(atransp, lpl->p_outproc, outdata)) {
|
||||
|
||||
Reference in New Issue
Block a user