diff options
author | Dan McDonald <danmcd@joyent.com> | 2017-09-19 10:05:18 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2017-09-19 10:08:41 -0400 |
commit | 0827cc77d5fbb0420473ad22f969348c3e6f7401 (patch) | |
tree | 24085e9d3f6f0f91f3d091ccfa028672aebb407d /usr/src/uts/common/rpc | |
parent | 919f1431f035c123b6b6e1efa2554b6e8729b494 (diff) | |
download | illumos-joyent-0827cc77d5fbb0420473ad22f969348c3e6f7401.tar.gz |
8654 unused local typedef in rpc code (fix lint)
Diffstat (limited to 'usr/src/uts/common/rpc')
-rw-r--r-- | usr/src/uts/common/rpc/xdr_sizeof.c | 12 | ||||
-rw-r--r-- | usr/src/uts/common/rpc/xdrrdma_sizeof.c | 10 |
2 files changed, 17 insertions, 5 deletions
diff --git a/usr/src/uts/common/rpc/xdr_sizeof.c b/usr/src/uts/common/rpc/xdr_sizeof.c index 9d3d231799..6197fcd25d 100644 --- a/usr/src/uts/common/rpc/xdr_sizeof.c +++ b/usr/src/uts/common/rpc/xdr_sizeof.c @@ -113,6 +113,12 @@ xdr_sizeof(xdrproc_t func, void *data) XDR x; struct xdr_ops ops; bool_t stat; + /* to stop ANSI-C compiler from complaining */ + typedef bool_t (* dummyfunc1)(XDR *, caddr_t, int); + typedef bool_t (* dummyfunc2)(XDR *, int, void *); +#if defined(_LP64) || defined(_KERNEL) + typedef bool_t (* dummyfunc3)(XDR *, int32_t *); +#endif ops.x_putbytes = x_putbytes; ops.x_inline = x_inline; @@ -121,13 +127,13 @@ xdr_sizeof(xdrproc_t func, void *data) ops.x_destroy = x_destroy; #if defined(_LP64) || defined(_KERNEL) - ops.x_getint32 = (void *)harmless; + ops.x_getint32 = (dummyfunc3)harmless; ops.x_putint32 = x_putint32_t; #endif /* the other harmless ones */ - ops.x_getbytes = (void *)harmless; - ops.x_control = (void *)harmless; + ops.x_getbytes = (dummyfunc1)harmless; + ops.x_control = (dummyfunc2)harmless; x.x_op = XDR_ENCODE; x.x_ops = &ops; diff --git a/usr/src/uts/common/rpc/xdrrdma_sizeof.c b/usr/src/uts/common/rpc/xdrrdma_sizeof.c index fb767d4195..431b52c1c3 100644 --- a/usr/src/uts/common/rpc/xdrrdma_sizeof.c +++ b/usr/src/uts/common/rpc/xdrrdma_sizeof.c @@ -276,6 +276,12 @@ xdrrdma_xops(void) { static struct xdr_ops ops; + /* to stop ANSI-C compiler from complaining */ + typedef bool_t (* dummyfunc1)(XDR *, caddr_t, int); +#if defined(_LP64) || defined(_KERNEL) + typedef bool_t (* dummyfunc2)(XDR *, int32_t *); +#endif + ops.x_putbytes = x_putbytes; ops.x_inline = x_inline; ops.x_getpostn = x_getpostn; @@ -284,12 +290,12 @@ xdrrdma_xops(void) ops.x_control = x_control; #if defined(_LP64) || defined(_KERNEL) - ops.x_getint32 = (void *)harmless; + ops.x_getint32 = (dummyfunc2)harmless; ops.x_putint32 = x_putint32_t; #endif /* the other harmless ones */ - ops.x_getbytes = (void *)harmless; + ops.x_getbytes = (dummyfunc1)harmless; return (&ops); } |