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 ↓ 234 lines elided ↑ open up ↑
 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  279          /* 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 *);
      280 +        typedef  bool_t (* dummyfunc1)(XDR *, caddr_t, int);
      281 +#if defined(_LP64) || defined(_KERNEL)
      282 +        typedef  bool_t (* dummyfunc2)(XDR *, int32_t *);
      283 +#endif
 281  284  
 282  285          ops.x_putbytes = x_putbytes;
 283  286          ops.x_inline = x_inline;
 284  287          ops.x_getpostn = x_getpostn;
 285  288          ops.x_setpostn = x_setpostn;
 286  289          ops.x_destroy = x_destroy;
 287  290          ops.x_control = x_control;
 288  291  
 289  292  #if defined(_LP64) || defined(_KERNEL)
 290      -        ops.x_getint32 = (dummyfunc3)harmless;
      293 +        ops.x_getint32 = (dummyfunc2)harmless;
 291  294          ops.x_putint32 = x_putint32_t;
 292  295  #endif
 293  296  
 294  297          /* the other harmless ones */
 295      -        ops.x_getbytes = (dummyfunc2)harmless;
      298 +        ops.x_getbytes = (dummyfunc1)harmless;
 296  299  
 297  300          return (&ops);
 298  301  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX