diff options
author | alfred <alfred@FreeBSD.org> | 2002-07-14 23:14:02 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-07-14 23:14:02 +0000 |
commit | 2d2461dde0d35597201455461cf1edbbb22489ff (patch) | |
tree | 20fe12c9691b844991ca922c889a22d46056bd34 /lib | |
parent | e00a16ef8cc7c0b360028e1fa35205723bc6d293 (diff) | |
download | FreeBSD-src-2d2461dde0d35597201455461cf1edbbb22489ff.zip FreeBSD-src-2d2461dde0d35597201455461cf1edbbb22489ff.tar.gz |
Silence several warnings due to functions that needed to take a void *
having a char * as an argument instead. clnt_dg_control(), clnt_raw_control(),
clnt_vc_control().
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/rpc/clnt_dg.c | 38 | ||||
-rw-r--r-- | lib/libc/rpc/clnt_raw.c | 4 | ||||
-rw-r--r-- | lib/libc/rpc/clnt_vc.c | 22 |
3 files changed, 32 insertions, 32 deletions
diff --git a/lib/libc/rpc/clnt_dg.c b/lib/libc/rpc/clnt_dg.c index 5779c35..302322a 100644 --- a/lib/libc/rpc/clnt_dg.c +++ b/lib/libc/rpc/clnt_dg.c @@ -73,7 +73,7 @@ static enum clnt_stat clnt_dg_call(CLIENT *, rpcproc_t, xdrproc_t, void *, static void clnt_dg_geterr(CLIENT *, struct rpc_err *); static bool_t clnt_dg_freeres(CLIENT *, xdrproc_t, void *); static void clnt_dg_abort(CLIENT *); -static bool_t clnt_dg_control(CLIENT *, u_int, char *); +static bool_t clnt_dg_control(CLIENT *, u_int, void *); static void clnt_dg_destroy(CLIENT *); static int __rpc_timeval_to_msec(struct timeval *); @@ -626,7 +626,7 @@ static bool_t clnt_dg_control(cl, request, info) CLIENT *cl; u_int request; - char *info; + void *info; { struct cu_data *cu = (struct cu_data *)cl->cl_private; struct netbuf *addr; @@ -663,40 +663,40 @@ clnt_dg_control(cl, request, info) } switch (request) { case CLSET_TIMEOUT: - if (time_not_ok((struct timeval *)(void *)info)) { + if (time_not_ok((struct timeval *)info)) { release_fd_lock(cu->cu_fd, mask); return (FALSE); } - cu->cu_total = *(struct timeval *)(void *)info; + cu->cu_total = *(struct timeval *)info; break; case CLGET_TIMEOUT: - *(struct timeval *)(void *)info = cu->cu_total; + *(struct timeval *)info = cu->cu_total; break; case CLGET_SERVER_ADDR: /* Give him the fd address */ /* Now obsolete. Only for backward compatibility */ (void) memcpy(info, &cu->cu_raddr, (size_t)cu->cu_rlen); break; case CLSET_RETRY_TIMEOUT: - if (time_not_ok((struct timeval *)(void *)info)) { + if (time_not_ok((struct timeval *)info)) { release_fd_lock(cu->cu_fd, mask); return (FALSE); } - cu->cu_wait = *(struct timeval *)(void *)info; + cu->cu_wait = *(struct timeval *)info; break; case CLGET_RETRY_TIMEOUT: - *(struct timeval *)(void *)info = cu->cu_wait; + *(struct timeval *)info = cu->cu_wait; break; case CLGET_FD: - *(int *)(void *)info = cu->cu_fd; + *(int *)info = cu->cu_fd; break; case CLGET_SVC_ADDR: - addr = (struct netbuf *)(void *)info; + addr = (struct netbuf *)info; addr->buf = &cu->cu_raddr; addr->len = cu->cu_rlen; addr->maxlen = sizeof cu->cu_raddr; break; case CLSET_SVC_ADDR: /* set to new address */ - addr = (struct netbuf *)(void *)info; + addr = (struct netbuf *)info; if (addr->len < sizeof cu->cu_raddr) { release_fd_lock(cu->cu_fd, mask); return (FALSE); @@ -710,14 +710,14 @@ clnt_dg_control(cl, request, info) * first element in the call structure *. * This will get the xid of the PREVIOUS call */ - *(u_int32_t *)(void *)info = + *(u_int32_t *)info = ntohl(*(u_int32_t *)(void *)cu->cu_outbuf); break; case CLSET_XID: /* This will set the xid of the NEXT call */ *(u_int32_t *)(void *)cu->cu_outbuf = - htonl(*(u_int32_t *)(void *)info - 1); + htonl(*(u_int32_t *)info - 1); /* decrement by 1 as clnt_dg_call() increments once */ break; @@ -728,14 +728,14 @@ clnt_dg_control(cl, request, info) * begining of the RPC header. MUST be changed if the * call_struct is changed */ - *(u_int32_t *)(void *)info = + *(u_int32_t *)info = ntohl(*(u_int32_t *)(void *)(cu->cu_outbuf + 4 * BYTES_PER_XDR_UNIT)); break; case CLSET_VERS: *(u_int32_t *)(void *)(cu->cu_outbuf + 4 * BYTES_PER_XDR_UNIT) - = htonl(*(u_int32_t *)(void *)info); + = htonl(*(u_int32_t *)info); break; case CLGET_PROG: @@ -745,20 +745,20 @@ clnt_dg_control(cl, request, info) * begining of the RPC header. MUST be changed if the * call_struct is changed */ - *(u_int32_t *)(void *)info = + *(u_int32_t *)info = ntohl(*(u_int32_t *)(void *)(cu->cu_outbuf + 3 * BYTES_PER_XDR_UNIT)); break; case CLSET_PROG: *(u_int32_t *)(void *)(cu->cu_outbuf + 3 * BYTES_PER_XDR_UNIT) - = htonl(*(u_int32_t *)(void *)info); + = htonl(*(u_int32_t *)info); break; case CLSET_ASYNC: - cu->cu_async = *(int *)(void *)info; + cu->cu_async = *(int *)info; break; case CLSET_CONNECT: - cu->cu_connect = *(int *)(void *)info; + cu->cu_connect = *(int *)info; break; default: release_fd_lock(cu->cu_fd, mask); diff --git a/lib/libc/rpc/clnt_raw.c b/lib/libc/rpc/clnt_raw.c index ed3aecd..a8e11c5 100644 --- a/lib/libc/rpc/clnt_raw.c +++ b/lib/libc/rpc/clnt_raw.c @@ -81,7 +81,7 @@ static enum clnt_stat clnt_raw_call(CLIENT *, rpcproc_t, xdrproc_t, void *, static void clnt_raw_geterr(CLIENT *, struct rpc_err *); static bool_t clnt_raw_freeres(CLIENT *, xdrproc_t, void *); static void clnt_raw_abort(CLIENT *); -static bool_t clnt_raw_control(CLIENT *, u_int, char *); +static bool_t clnt_raw_control(CLIENT *, u_int, void *); static void clnt_raw_destroy(CLIENT *); static struct clnt_ops *clnt_raw_ops(void); @@ -280,7 +280,7 @@ static bool_t clnt_raw_control(cl, ui, str) CLIENT *cl; u_int ui; - char *str; + void *str; { return (FALSE); } diff --git a/lib/libc/rpc/clnt_vc.c b/lib/libc/rpc/clnt_vc.c index 60f5996..52c3428 100644 --- a/lib/libc/rpc/clnt_vc.c +++ b/lib/libc/rpc/clnt_vc.c @@ -92,7 +92,7 @@ static enum clnt_stat clnt_vc_call(CLIENT *, rpcproc_t, xdrproc_t, void *, static void clnt_vc_geterr(CLIENT *, struct rpc_err *); static bool_t clnt_vc_freeres(CLIENT *, xdrproc_t, void *); static void clnt_vc_abort(CLIENT *); -static bool_t clnt_vc_control(CLIENT *, u_int, char *); +static bool_t clnt_vc_control(CLIENT *, u_int, void *); static void clnt_vc_destroy(CLIENT *); static struct clnt_ops *clnt_vc_ops(void); static bool_t time_not_ok(struct timeval *); @@ -495,7 +495,7 @@ static bool_t clnt_vc_control(cl, request, info) CLIENT *cl; u_int request; - char *info; + void *info; { struct ct_data *ct; void *infop = info; @@ -539,7 +539,7 @@ clnt_vc_control(cl, request, info) } switch (request) { case CLSET_TIMEOUT: - if (time_not_ok((struct timeval *)(void *)info)) { + if (time_not_ok((struct timeval *)info)) { release_fd_lock(ct->ct_fd, mask); return (FALSE); } @@ -553,11 +553,11 @@ clnt_vc_control(cl, request, info) (void) memcpy(info, ct->ct_addr.buf, (size_t)ct->ct_addr.len); break; case CLGET_FD: - *(int *)(void *)info = ct->ct_fd; + *(int *)info = ct->ct_fd; break; case CLGET_SVC_ADDR: /* The caller should not free this memory area */ - *(struct netbuf *)(void *)info = ct->ct_addr; + *(struct netbuf *)info = ct->ct_addr; break; case CLSET_SVC_ADDR: /* set to new address */ release_fd_lock(ct->ct_fd, mask); @@ -568,13 +568,13 @@ clnt_vc_control(cl, request, info) * first element in the call structure * This will get the xid of the PREVIOUS call */ - *(u_int32_t *)(void *)info = + *(u_int32_t *)info = ntohl(*(u_int32_t *)(void *)&ct->ct_u.ct_mcalli); break; case CLSET_XID: /* This will set the xid of the NEXT call */ *(u_int32_t *)(void *)&ct->ct_u.ct_mcalli = - htonl(*((u_int32_t *)(void *)info) + 1); + htonl(*((u_int32_t *)info) + 1); /* increment by 1 as clnt_vc_call() decrements once */ break; case CLGET_VERS: @@ -584,7 +584,7 @@ clnt_vc_control(cl, request, info) * begining of the RPC header. MUST be changed if the * call_struct is changed */ - *(u_int32_t *)(void *)info = + *(u_int32_t *)info = ntohl(*(u_int32_t *)(void *)(ct->ct_u.ct_mcallc + 4 * BYTES_PER_XDR_UNIT)); break; @@ -592,7 +592,7 @@ clnt_vc_control(cl, request, info) case CLSET_VERS: *(u_int32_t *)(void *)(ct->ct_u.ct_mcallc + 4 * BYTES_PER_XDR_UNIT) = - htonl(*(u_int32_t *)(void *)info); + htonl(*(u_int32_t *)info); break; case CLGET_PROG: @@ -602,7 +602,7 @@ clnt_vc_control(cl, request, info) * begining of the RPC header. MUST be changed if the * call_struct is changed */ - *(u_int32_t *)(void *)info = + *(u_int32_t *)info = ntohl(*(u_int32_t *)(void *)(ct->ct_u.ct_mcallc + 3 * BYTES_PER_XDR_UNIT)); break; @@ -610,7 +610,7 @@ clnt_vc_control(cl, request, info) case CLSET_PROG: *(u_int32_t *)(void *)(ct->ct_u.ct_mcallc + 3 * BYTES_PER_XDR_UNIT) = - htonl(*(u_int32_t *)(void *)info); + htonl(*(u_int32_t *)info); break; default: |