Print this page
8654 unused local typedef in rpc code
@@ -23,10 +23,11 @@
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2017 RackTop Systems.
*/
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <sys/types.h>
@@ -110,30 +111,25 @@
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 *, long *);
- typedef bool_t (* dummyfunc2)(XDR *, caddr_t, int);
- typedef bool_t (* dummyfunc3)(XDR *, int32_t *);
- typedef bool_t (* dummyfunc4)(XDR *, int, void *);
ops.x_putbytes = x_putbytes;
ops.x_inline = x_inline;
ops.x_getpostn = x_getpostn;
ops.x_setpostn = x_setpostn;
ops.x_destroy = x_destroy;
#if defined(_LP64) || defined(_KERNEL)
- ops.x_getint32 = (dummyfunc3)harmless;
+ ops.x_getint32 = (void *)harmless;
ops.x_putint32 = x_putint32_t;
#endif
/* the other harmless ones */
- ops.x_getbytes = (dummyfunc2)harmless;
- ops.x_control = (dummyfunc4)harmless;
+ ops.x_getbytes = (void *)harmless;
+ ops.x_control = (void *)harmless;
x.x_op = XDR_ENCODE;
x.x_ops = &ops;
x.x_handy = 0;
x.x_private = (caddr_t)NULL;