Print this page
8654 unused local typedef in rpc code

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/rpc/xdrrdma_sizeof.c
          +++ new/usr/src/uts/common/rpc/xdrrdma_sizeof.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2017 RackTop Systems.
  24   26   */
  25   27  
  26   28  #include <rpc/types.h>
  27   29  #include <rpc/xdr.h>
  28   30  #include <sys/types.h>
  29   31  #include <sys/sdt.h>
  30   32  #include <rpc/auth.h>
  31   33  #include <rpc/rpc_rdma.h>
  32   34  
  33   35  struct private {
↓ open down ↓ 233 lines elided ↑ open up ↑
 267  269                  mem_free(xdrp, sizeof (struct private));
 268  270          }
 269  271          return (stat == TRUE ? (unsigned int)x.x_handy: 0);
 270  272  }
 271  273  
 272  274  struct xdr_ops *
 273  275  xdrrdma_xops(void)
 274  276  {
 275  277          static struct xdr_ops ops;
 276  278  
 277      -        /* to stop ANSI-C compiler from complaining */
 278      -        typedef  bool_t (* dummyfunc1)(XDR *, long *);
 279      -        typedef  bool_t (* dummyfunc2)(XDR *, caddr_t, int);
 280      -        typedef  bool_t (* dummyfunc3)(XDR *, int32_t *);
 281      -
 282  279          ops.x_putbytes = x_putbytes;
 283  280          ops.x_inline = x_inline;
 284  281          ops.x_getpostn = x_getpostn;
 285  282          ops.x_setpostn = x_setpostn;
 286  283          ops.x_destroy = x_destroy;
 287  284          ops.x_control = x_control;
 288  285  
 289  286  #if defined(_LP64) || defined(_KERNEL)
 290      -        ops.x_getint32 = (dummyfunc3)harmless;
      287 +        ops.x_getint32 = (void *)harmless;
 291  288          ops.x_putint32 = x_putint32_t;
 292  289  #endif
 293  290  
 294  291          /* the other harmless ones */
 295      -        ops.x_getbytes = (dummyfunc2)harmless;
      292 +        ops.x_getbytes = (void *)harmless;
 296  293  
 297  294          return (&ops);
 298  295  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX