summaryrefslogtreecommitdiffstats
path: root/cpukit/librpc
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2005-01-09 17:12:03 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2005-01-09 17:12:03 +0000
commit77b6a109132b9f68cb030fbb4ba79253f3530d03 (patch)
tree27f135c67a4e3f73db972078994b190a0e1dc0b3 /cpukit/librpc
parent21023ab852e862067429aaf4064edf33d11122ff (diff)
downloadrtems-77b6a109132b9f68cb030fbb4ba79253f3530d03.tar.bz2
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.
Diffstat (limited to 'cpukit/librpc')
-rw-r--r--cpukit/librpc/include/rpc/clnt.h12
-rw-r--r--cpukit/librpc/src/rpc/authunix_prot.c2
-rw-r--r--cpukit/librpc/src/rpc/clnt_tcp.c2
-rw-r--r--cpukit/librpc/src/rpc/pmap_prot2.c2
-rw-r--r--cpukit/librpc/src/rpc/pmap_rmt.c6
-rw-r--r--cpukit/librpc/src/rpc/rtems_portmapper.c23
-rw-r--r--cpukit/librpc/src/rpc/svc_simple.c5
7 files changed, 27 insertions, 25 deletions
diff --git a/cpukit/librpc/include/rpc/clnt.h b/cpukit/librpc/include/rpc/clnt.h
index dc0f12d25c..0ecce4b38e 100644
--- a/cpukit/librpc/include/rpc/clnt.h
+++ b/cpukit/librpc/include/rpc/clnt.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
diff --git a/cpukit/librpc/src/rpc/authunix_prot.c b/cpukit/librpc/src/rpc/authunix_prot.c
index 4fddc6b96d..e6e91f5396 100644
--- a/cpukit/librpc/src/rpc/authunix_prot.c
+++ b/cpukit/librpc/src/rpc/authunix_prot.c
@@ -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);
diff --git a/cpukit/librpc/src/rpc/clnt_tcp.c b/cpukit/librpc/src/rpc/clnt_tcp.c
index fa477b76d4..e497a35657 100644
--- a/cpukit/librpc/src/rpc/clnt_tcp.c
+++ b/cpukit/librpc/src/rpc/clnt_tcp.c
@@ -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 */
diff --git a/cpukit/librpc/src/rpc/pmap_prot2.c b/cpukit/librpc/src/rpc/pmap_prot2.c
index e29efe62c1..65ede28c37 100644
--- a/cpukit/librpc/src/rpc/pmap_prot2.c
+++ b/cpukit/librpc/src/rpc/pmap_prot2.c
@@ -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);
}
diff --git a/cpukit/librpc/src/rpc/pmap_rmt.c b/cpukit/librpc/src/rpc/pmap_rmt.c
index 32a51be239..709a7ce241 100644
--- a/cpukit/librpc/src/rpc/pmap_rmt.c
+++ b/cpukit/librpc/src/rpc/pmap_rmt.c
@@ -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);
diff --git a/cpukit/librpc/src/rpc/rtems_portmapper.c b/cpukit/librpc/src/rpc/rtems_portmapper.c
index f49482d918..da2530a2d0 100644
--- a/cpukit/librpc/src/rpc/rtems_portmapper.c
+++ b/cpukit/librpc/src/rpc/rtems_portmapper.c
@@ -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)&reg))
+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)&reg))
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)&reg))
+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)&reg))
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)&reg))
+ if (!svc_getargs(xprt, (xdrproc_t) xdr_pmap, (caddr_t)&reg))
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);
diff --git a/cpukit/librpc/src/rpc/svc_simple.c b/cpukit/librpc/src/rpc/svc_simple.c
index 0f91127b02..cd19a5c112 100644
--- a/cpukit/librpc/src/rpc/svc_simple.c
+++ b/cpukit/librpc/src/rpc/svc_simple.c
@@ -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)) {