diff options
author | Toomas Soome <tsoome@me.com> | 2018-10-21 10:40:46 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2019-09-30 22:50:59 +0300 |
commit | 4d633836fc25186ed4c118b2072d2b88cf87a700 (patch) | |
tree | 210bf7d1cdc29df6ea4b7547d3065bb0f6833fdc | |
parent | 90948640db5d93c4ddf069ea009faccb36fb16b0 (diff) | |
download | illumos-joyent-4d633836fc25186ed4c118b2072d2b88cf87a700.tar.gz |
11720 rpcmod: cast between incompatible function types
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/uts/common/rpc/clnt_clts.c | 18 | ||||
-rw-r--r-- | usr/src/uts/common/rpc/rpcmod.c | 28 |
2 files changed, 25 insertions, 21 deletions
diff --git a/usr/src/uts/common/rpc/clnt_clts.c b/usr/src/uts/common/rpc/clnt_clts.c index 8a90857172..f881bbc9e2 100644 --- a/usr/src/uts/common/rpc/clnt_clts.c +++ b/usr/src/uts/common/rpc/clnt_clts.c @@ -309,8 +309,8 @@ clnt_clts_stats_fini(zoneid_t zoneid, struct rpc_clts_client **statsp) /* ARGSUSED */ int clnt_clts_kcreate(struct knetconfig *config, struct netbuf *addr, - rpcprog_t pgm, rpcvers_t vers, int retrys, struct cred *cred, - CLIENT **cl) + rpcprog_t pgm, rpcvers_t vers, int retrys, struct cred *cred, + CLIENT **cl) { CLIENT *h; struct cku_private *p; @@ -418,8 +418,8 @@ clnt_clts_kinit(CLIENT *h, struct netbuf *addr, int retrys, cred_t *cred) */ static int clnt_clts_ksettimers(CLIENT *h, struct rpc_timers *t, struct rpc_timers *all, - int minimum, void (*feedback)(int, int, caddr_t), caddr_t arg, - uint32_t xid) + int minimum, void (*feedback)(int, int, caddr_t), caddr_t arg, + uint32_t xid) { /* LINTED pointer alignment */ struct cku_private *p = htop(h); @@ -460,8 +460,8 @@ clnt_clts_ksettimers(CLIENT *h, struct rpc_timers *t, struct rpc_timers *all, */ enum clnt_stat clnt_clts_kcallit_addr(CLIENT *h, rpcproc_t procnum, xdrproc_t xdr_args, - caddr_t argsp, xdrproc_t xdr_results, caddr_t resultsp, - struct timeval wait, struct netbuf *sin) + caddr_t argsp, xdrproc_t xdr_results, caddr_t resultsp, + struct timeval wait, struct netbuf *sin) { /* LINTED pointer alignment */ struct cku_private *p = htop(h); @@ -1004,8 +1004,8 @@ done: static enum clnt_stat clnt_clts_kcallit(CLIENT *h, rpcproc_t procnum, xdrproc_t xdr_args, - caddr_t argsp, xdrproc_t xdr_results, caddr_t resultsp, - struct timeval wait) + caddr_t argsp, xdrproc_t xdr_results, caddr_t resultsp, + struct timeval wait) { return (clnt_clts_kcallit_addr(h, procnum, xdr_args, argsp, xdr_results, resultsp, wait, NULL)); @@ -2005,7 +2005,7 @@ endpnt_repossess(void *a) */ if (endpnt_taskq != NULL) (void) taskq_dispatch(endpnt_taskq, - (task_func_t *)endpnt_reclaim, (void *)ALL_ZONES, + (task_func_t *)(uintptr_t)endpnt_reclaim, (void *)ALL_ZONES, TQ_NOSLEEP); } diff --git a/usr/src/uts/common/rpc/rpcmod.c b/usr/src/uts/common/rpc/rpcmod.c index 5463415c9c..322c6e659f 100644 --- a/usr/src/uts/common/rpc/rpcmod.c +++ b/usr/src/uts/common/rpc/rpcmod.c @@ -212,10 +212,10 @@ int rmm_close(queue_t *, int, cred_t *); * To save instructions, since STREAMS ignores the return value * from these functions, they are defined as void here. Kind of icky, but... */ -void rmm_rput(queue_t *, mblk_t *); -void rmm_wput(queue_t *, mblk_t *); -void rmm_rsrv(queue_t *); -void rmm_wsrv(queue_t *); +int rmm_rput(queue_t *, mblk_t *); +int rmm_wput(queue_t *, mblk_t *); +int rmm_rsrv(queue_t *); +int rmm_wsrv(queue_t *); int rpcmodopen(queue_t *, dev_t *, int, int, cred_t *); int rpcmodclose(queue_t *, int, cred_t *); @@ -237,8 +237,8 @@ static struct module_info rpcmod_info = {RPCMOD_ID, "rpcmod", 0, INFPSZ, 256*1024, 1024}; static struct qinit rpcmodrinit = { - (int (*)())rmm_rput, - (int (*)())rmm_rsrv, + rmm_rput, + rmm_rsrv, rmm_open, rmm_close, nulldev, @@ -252,8 +252,8 @@ static struct qinit rpcmodrinit = { * synchronize with flow control. */ static struct qinit rpcmodwinit = { - (int (*)())rmm_wput, - (int (*)())rmm_wsrv, + rmm_wput, + rmm_wsrv, rmm_open, rmm_close, nulldev, @@ -542,28 +542,32 @@ out: return (error); } -void +int rmm_rput(queue_t *q, mblk_t *mp) { (*((struct temp_slot *)q->q_ptr)->ops->xo_rput)(q, mp); + return (0); } -void +int rmm_rsrv(queue_t *q) { (*((struct temp_slot *)q->q_ptr)->ops->xo_rsrv)(q); + return (0); } -void +int rmm_wput(queue_t *q, mblk_t *mp) { (*((struct temp_slot *)q->q_ptr)->ops->xo_wput)(q, mp); + return (0); } -void +int rmm_wsrv(queue_t *q) { (*((struct temp_slot *)q->q_ptr)->ops->xo_wsrv)(q); + return (0); } int |