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>
@@ -111,14 +112,15 @@
{
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 (* dummyfunc1)(XDR *, caddr_t, int);
+ typedef bool_t (* dummyfunc2)(XDR *, int, void *);
+#if defined(_LP64) || defined(_KERNEL)
typedef bool_t (* dummyfunc3)(XDR *, int32_t *);
- typedef bool_t (* dummyfunc4)(XDR *, int, void *);
+#endif
ops.x_putbytes = x_putbytes;
ops.x_inline = x_inline;
ops.x_getpostn = x_getpostn;
ops.x_setpostn = x_setpostn;
@@ -128,12 +130,12 @@
ops.x_getint32 = (dummyfunc3)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 = (dummyfunc1)harmless;
+ ops.x_control = (dummyfunc2)harmless;
x.x_op = XDR_ENCODE;
x.x_ops = &ops;
x.x_handy = 0;
x.x_private = (caddr_t)NULL;