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:
Joel Sherrill
2005-01-09 17:12:03 +00:00
parent 21023ab852
commit 77b6a10913
8 changed files with 34 additions and 25 deletions

View File

@@ -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> 2005-01-07 Ralf Corsepius <ralf.corsepius@rtems.org>
* librpc/include/rpc/auth_des.h, librpc/include/rpc/xdr.h, * librpc/include/rpc/auth_des.h, librpc/include/rpc/xdr.h,

View File

@@ -159,11 +159,11 @@ typedef struct __rpc_client {
* struct timeval timeout; * struct timeval timeout;
*/ */
#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \ #define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \
((*(rh)->cl_ops->cl_call)(rh, proc, xargs, (caddr_t)argsp, \ ((*(rh)->cl_ops->cl_call)(rh, proc, (xdrproc_t)xargs, (caddr_t)argsp, \
xres, (caddr_t)resp, secs)) (xdrproc_t) xres, (caddr_t)resp, secs))
#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \ #define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \
((*(rh)->cl_ops->cl_call)(rh, proc, xargs, (caddr_t)argsp, \ ((*(rh)->cl_ops->cl_call)(rh, proc, (xdrproc_t) xargs, (caddr_t)argsp, \
xres, (caddr_t)resp, secs)) (xdrproc_t) xres, (caddr_t)resp, secs))
/* /*
* void * void
@@ -189,8 +189,8 @@ typedef struct __rpc_client {
* xdrproc_t xres; * xdrproc_t xres;
* caddr_t resp; * 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,(xdrproc_t)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))
/* /*
* bool_t * bool_t

View File

@@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p)
&& xdr_int(xdrs, &(p->aup_uid)) && xdr_int(xdrs, &(p->aup_uid))
&& xdr_int(xdrs, &(p->aup_gid)) && xdr_int(xdrs, &(p->aup_gid))
&& xdr_array(xdrs, (caddr_t *)&(p->aup_gids), && 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 (TRUE);
} }
return (FALSE); return (FALSE);

View File

@@ -288,7 +288,7 @@ call_again:
while (TRUE) { while (TRUE) {
reply_msg.acpted_rply.ar_verf = _null_auth; reply_msg.acpted_rply.ar_verf = _null_auth;
reply_msg.acpted_rply.ar_results.where = NULL; 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)) if (! xdrrec_skiprecord(xdrs))
return (ct->ct_error.re_status); return (ct->ct_error.re_status);
/* now decode and validate the response header */ /* now decode and validate the response header */

View File

@@ -111,7 +111,7 @@ xdr_pmaplist(xdrs, rp)
if (freeing) if (freeing)
next = &((*rp)->pml_next); next = &((*rp)->pml_next);
if (! xdr_reference(xdrs, (caddr_t *)rp, 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); return (FALSE);
rp = (freeing) ? next : &((*rp)->pml_next); rp = (freeing) ? next : &((*rp)->pml_next);
} }

View File

@@ -149,7 +149,7 @@ xdr_rmtcallres(xdrs, crp)
port_ptr = (caddr_t)crp->port_ptr; port_ptr = (caddr_t)crp->port_ptr;
if (xdr_reference(xdrs, &port_ptr, sizeof (u_long), 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; crp->port_ptr = (u_long *)port_ptr;
return ((*(crp->xdr_results))(xdrs, crp->results_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: recv_again:
msg.acpted_rply.ar_verf = _null_auth; msg.acpted_rply.ar_verf = _null_auth;
msg.acpted_rply.ar_results.where = (caddr_t)&r; 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 */ /* XXX we know the other bits are still clear */
FD_SET(sock, fds); FD_SET(sock, fds);
tv = t; /* for select() that copies back */ 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 ... */ /* otherwise, we just ignore the errors ... */
} }
xdrs->x_op = XDR_FREE; 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)xdr_replymsg(xdrs, &msg);
(void)(*xresults)(xdrs, resultsp); (void)(*xresults)(xdrs, resultsp);
xdr_destroy(xdrs); xdr_destroy(xdrs);

View File

@@ -159,7 +159,8 @@ static void reg_service(
/* /*
* Null proc call * Null proc call
*/ */
if ((!svc_sendreply(xprt, xdr_void, NULL)) && debugging) { if ((!svc_sendreply(xprt, (xdrproc_t) xdr_void, NULL)) &&
debugging) {
abort(); abort();
} }
break; break;
@@ -168,7 +169,7 @@ static void reg_service(
/* /*
* Set a program,version to port mapping * Set a program,version to port mapping
*/ */
if (!svc_getargs(xprt, xdr_pmap, (caddr_t)&reg)) if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)&reg))
svcerr_decode(xprt); svcerr_decode(xprt);
else { else {
/* /*
@@ -204,7 +205,7 @@ static void reg_service(
ans = 1; ans = 1;
} }
done: done:
if ((!svc_sendreply(xprt, xdr_long, (caddr_t)&ans)) && if ((!svc_sendreply(xprt, (xdrproc_t) xdr_long, (caddr_t)&ans)) &&
debugging) { debugging) {
fprintf(stderr, "svc_sendreply\n"); fprintf(stderr, "svc_sendreply\n");
abort(); abort();
@@ -216,7 +217,7 @@ static void reg_service(
/* /*
* Remove a program,version to port mapping. * Remove a program,version to port mapping.
*/ */
if (!svc_getargs(xprt, xdr_pmap, (caddr_t)&reg)) if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)&reg))
svcerr_decode(xprt); svcerr_decode(xprt);
else { else {
ans = 0; ans = 0;
@@ -238,7 +239,7 @@ static void reg_service(
prevpml->pml_next = pml; prevpml->pml_next = pml;
free(t); free(t);
} }
if ((!svc_sendreply(xprt, xdr_long, (caddr_t)&ans)) && if ((!svc_sendreply(xprt, (xdrproc_t) xdr_long, (caddr_t)&ans)) &&
debugging) { debugging) {
fprintf(stderr, "svc_sendreply\n"); fprintf(stderr, "svc_sendreply\n");
abort(); abort();
@@ -250,7 +251,7 @@ static void reg_service(
/* /*
* Lookup the mapping for a program,version and return its port * Lookup the mapping for a program,version and return its port
*/ */
if (!svc_getargs(xprt, xdr_pmap, (caddr_t)&reg)) if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)&reg))
svcerr_decode(xprt); svcerr_decode(xprt);
else { else {
fnd = find_service(reg.pm_prog, reg.pm_vers, reg.pm_prot); 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; port = fnd->pml_map.pm_port;
else else
port = 0; port = 0;
if ((!svc_sendreply(xprt, xdr_long, (caddr_t)&port)) && if ((!svc_sendreply(xprt, (xdrproc_t) xdr_long, (caddr_t)&port)) &&
debugging) { debugging) {
fprintf(stderr, "svc_sendreply\n"); fprintf(stderr, "svc_sendreply\n");
abort(); abort();
@@ -270,10 +271,10 @@ static void reg_service(
/* /*
* Return the current set of mapped program,version * 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); svcerr_decode(xprt);
else { else {
if ((!svc_sendreply(xprt, xdr_pmaplist, if ((!svc_sendreply(xprt, (xdrproc_t) xdr_pmaplist,
(caddr_t)&pmaplist)) && debugging) { (caddr_t)&pmaplist)) && debugging) {
fprintf(stderr, "svc_sendreply\n"); fprintf(stderr, "svc_sendreply\n");
abort(); abort();
@@ -419,7 +420,7 @@ callit(
timeout.tv_sec = 5; timeout.tv_sec = 5;
timeout.tv_usec = 0; timeout.tv_usec = 0;
a.rmt_args.args = buf; 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; return;
if ((pml = find_service(a.rmt_prog, a.rmt_vers, IPPROTO_UDP)) == NULL) if ((pml = find_service(a.rmt_prog, a.rmt_vers, IPPROTO_UDP)) == NULL)
return; return;
@@ -445,7 +446,7 @@ callit(
a.rmt_port = (u_long)port; a.rmt_port = (u_long)port;
if (clnt_call(client, a.rmt_proc, xdr_opaque_parms, &a, if (clnt_call(client, a.rmt_proc, xdr_opaque_parms, &a,
xdr_len_opaque_parms, &a, timeout) == RPC_SUCCESS) { 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); AUTH_DESTROY(client->cl_auth);
clnt_destroy(client); clnt_destroy(client);

View File

@@ -118,7 +118,7 @@ universal(
* enforce "procnum 0 is echo" convention * enforce "procnum 0 is echo" convention
*/ */
if (rqstp->rq_proc == NULLPROC) { 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"); (void) fprintf(stderr, "xxx\n");
exit(1); exit(1);
} }
@@ -135,7 +135,8 @@ universal(
return; return;
} }
outdata = (*(lpl->p_progname))(xdrbuf); 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 */ /* there was an error */
return; return;
if (!svc_sendreply(atransp, lpl->p_outproc, outdata)) { if (!svc_sendreply(atransp, lpl->p_outproc, outdata)) {