Print this page
8654 unused local typedef in rpc code

@@ -19,10 +19,12 @@
  * CDDL HEADER END
  */
 /*
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright 2017 RackTop Systems.
  */
 
 #include <rpc/types.h>
 #include <rpc/xdr.h>
 #include <sys/types.h>

@@ -272,27 +274,22 @@
 struct xdr_ops *
 xdrrdma_xops(void)
 {
         static struct xdr_ops ops;
 
-        /* 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 *);
-
         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;
         ops.x_control = x_control;
 
 #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_getbytes = (void *)harmless;
 
         return (&ops);
 }