Print this page
7127  remove -Wno-missing-braces from Makefile.uts

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp/tcp_opt_data.c
          +++ new/usr/src/uts/common/inet/tcp/tcp_opt_data.c
↓ open down ↓ 46 lines elided ↑ open up ↑
  47   47  /*
  48   48   * Table of all known options handled on a TCP protocol stack.
  49   49   *
  50   50   * Note: This table contains options processed by both TCP and IP levels
  51   51   *       and is the superset of options that can be performed on a TCP over IP
  52   52   *       stack.
  53   53   */
  54   54  opdes_t tcp_opt_arr[] = {
  55   55  
  56   56  { SO_LINGER,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
  57      -        sizeof (struct linger), 0 },
       57 +        sizeof (struct linger), {0}},
  58   58  
  59      -{ SO_DEBUG,     SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
  60      -{ SO_KEEPALIVE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
  61      -{ SO_DONTROUTE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
  62      -{ SO_USELOOPBACK, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0
       59 +{ SO_DEBUG,     SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
       60 +{ SO_KEEPALIVE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
       61 +{ SO_DONTROUTE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
       62 +{ SO_USELOOPBACK, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}
  63   63          },
  64      -{ SO_BROADCAST, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
  65      -{ SO_REUSEADDR, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
  66      -{ SO_OOBINLINE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
  67      -{ SO_TYPE,      SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
  68      -{ SO_SNDBUF,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
  69      -{ SO_RCVBUF,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
       64 +{ SO_BROADCAST, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
       65 +{ SO_REUSEADDR, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
       66 +{ SO_OOBINLINE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
       67 +{ SO_TYPE,      SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), {0}},
       68 +{ SO_SNDBUF,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
       69 +{ SO_RCVBUF,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
  70   70  { SO_SNDTIMEO,  SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
  71      -        sizeof (struct timeval), 0 },
       71 +        sizeof (struct timeval), {0}},
  72   72  { SO_RCVTIMEO,  SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
  73      -        sizeof (struct timeval), 0 },
  74      -{ SO_DGRAM_ERRIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0
       73 +        sizeof (struct timeval), {0}},
       74 +{ SO_DGRAM_ERRIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}
  75   75          },
  76      -{ SO_SND_COPYAVOID, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
       76 +{ SO_SND_COPYAVOID, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
  77   77  { SO_ANON_MLP, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int),
  78      -        0 },
       78 +        {0}},
  79   79  { SO_MAC_EXEMPT, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int),
  80      -        0 },
       80 +        {0}},
  81   81  { SO_MAC_IMPLICIT, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int),
  82      -        0 },
       82 +        {0}},
  83   83  { SO_ALLZONES, SOL_SOCKET, OA_R, OA_RW, OP_CONFIG, 0, sizeof (int),
  84      -        0 },
  85      -{ SO_EXCLBIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
       84 +        {0}},
       85 +{ SO_EXCLBIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
  86   86  
  87      -{ SO_DOMAIN,    SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
       87 +{ SO_DOMAIN,    SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), {0}},
  88   88  
  89      -{ SO_PROTOTYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
       89 +{ SO_PROTOTYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), {0}},
  90   90  
  91      -{ TCP_NODELAY,  IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0
       91 +{ TCP_NODELAY,  IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}
  92   92          },
  93   93  { TCP_MAXSEG,   IPPROTO_TCP, OA_R, OA_R, OP_NP, 0, sizeof (uint_t),
  94      -        536 },
       94 +        {536} },
  95   95  
  96   96  { TCP_NOTIFY_THRESHOLD, IPPROTO_TCP, OA_RW, OA_RW, OP_NP,
  97      -        OP_DEF_FN, sizeof (int), -1 /* not initialized */ },
       97 +        OP_DEF_FN, sizeof (int), {-1}/* not initialized */ },
  98   98  
  99   99  { TCP_ABORT_THRESHOLD, IPPROTO_TCP, OA_RW, OA_RW, OP_NP,
 100      -        OP_DEF_FN, sizeof (int), -1 /* not initialized */ },
      100 +        OP_DEF_FN, sizeof (int), {-1}/* not initialized */ },
 101  101  
 102  102  { TCP_CONN_NOTIFY_THRESHOLD, IPPROTO_TCP, OA_RW, OA_RW, OP_NP,
 103      -        OP_DEF_FN, sizeof (int), -1 /* not initialized */ },
      103 +        OP_DEF_FN, sizeof (int), {-1}/* not initialized */ },
 104  104  
 105  105  { TCP_CONN_ABORT_THRESHOLD, IPPROTO_TCP, OA_RW, OA_RW, OP_NP,
 106      -        OP_DEF_FN, sizeof (int), -1 /* not initialized */ },
      106 +        OP_DEF_FN, sizeof (int), {-1}/* not initialized */ },
 107  107  
 108  108  { TCP_RECVDSTADDR, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int),
 109      -        0 },
      109 +        {0}},
 110  110  
 111  111  { TCP_ANONPRIVBIND, IPPROTO_TCP, OA_R, OA_RW, OP_PRIVPORT, 0,
 112      -        sizeof (int), 0 },
      112 +        sizeof (int), {0}},
 113  113  
 114      -{ TCP_EXCLBIND, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0
      114 +{ TCP_EXCLBIND, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}
 115  115          },
 116  116  
 117  117  { TCP_INIT_CWND, IPPROTO_TCP, OA_RW, OA_RW, OP_CONFIG, 0,
 118      -        sizeof (int), 0 },
      118 +        sizeof (int), {0}},
 119  119  
 120  120  { TCP_KEEPALIVE_THRESHOLD, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0,
 121      -        sizeof (int), 0 },
      121 +        sizeof (int), {0}},
 122  122  
 123      -{ TCP_KEEPIDLE, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      123 +{ TCP_KEEPIDLE, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 124  124  
 125      -{ TCP_KEEPCNT, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      125 +{ TCP_KEEPCNT, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 126  126  
 127      -{ TCP_KEEPINTVL, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      127 +{ TCP_KEEPINTVL, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 128  128  
 129  129  { TCP_KEEPALIVE_ABORT_THRESHOLD, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0,
 130      -        sizeof (int), 0 },
      130 +        sizeof (int), {0}},
 131  131  
 132      -{ TCP_CORK, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      132 +{ TCP_CORK, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 133  133  
 134      -{ TCP_RTO_INITIAL, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (uint32_t), 0 },
      134 +{ TCP_RTO_INITIAL, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (uint32_t), {0}},
 135  135  
 136      -{ TCP_RTO_MIN, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (uint32_t), 0 },
      136 +{ TCP_RTO_MIN, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (uint32_t), {0}},
 137  137  
 138      -{ TCP_RTO_MAX, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (uint32_t), 0 },
      138 +{ TCP_RTO_MAX, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (uint32_t), {0}},
 139  139  
 140      -{ TCP_LINGER2, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      140 +{ TCP_LINGER2, IPPROTO_TCP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 141  141  
 142  142  { IP_OPTIONS,   IPPROTO_IP, OA_RW, OA_RW, OP_NP,
 143  143          (OP_VARLEN|OP_NODEFAULT),
 144      -        IP_MAX_OPT_LENGTH + IP_ADDR_LEN, -1 /* not initialized */ },
      144 +        IP_MAX_OPT_LENGTH + IP_ADDR_LEN, {-1}/* not initialized */ },
 145  145  { T_IP_OPTIONS, IPPROTO_IP, OA_RW, OA_RW, OP_NP,
 146  146          (OP_VARLEN|OP_NODEFAULT),
 147      -        IP_MAX_OPT_LENGTH + IP_ADDR_LEN, -1 /* not initialized */ },
      147 +        IP_MAX_OPT_LENGTH + IP_ADDR_LEN, {-1}/* not initialized */ },
 148  148  
 149      -{ IP_TOS,       IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 150      -{ T_IP_TOS,     IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      149 +{ IP_TOS,       IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      150 +{ T_IP_TOS,     IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 151  151  { IP_TTL,       IPPROTO_IP, OA_RW, OA_RW, OP_NP, OP_DEF_FN,
 152      -        sizeof (int), -1 /* not initialized */ },
      152 +        sizeof (int), {-1}/* not initialized */ },
 153  153  
 154  154  { IP_SEC_OPT, IPPROTO_IP, OA_RW, OA_RW, OP_NP, OP_NODEFAULT,
 155      -        sizeof (ipsec_req_t), -1 /* not initialized */ },
      155 +        sizeof (ipsec_req_t), {-1}/* not initialized */ },
 156  156  
 157  157  { IP_BOUND_IF, IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0,
 158      -        sizeof (int),   0 /* no ifindex */ },
      158 +        sizeof (int), {0} /* no ifindex */ },
 159  159  
 160  160  { IP_UNSPEC_SRC, IPPROTO_IP, OA_R, OA_RW, OP_RAW, 0,
 161      -        sizeof (int), 0 },
      161 +        sizeof (int), {0}},
 162  162  
 163  163  { IPV6_UNICAST_HOPS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, OP_DEF_FN,
 164      -        sizeof (int), -1 /* not initialized */ },
      164 +        sizeof (int), {-1}/* not initialized */ },
 165  165  
 166  166  { IPV6_BOUND_IF, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 167      -        sizeof (int),   0 /* no ifindex */ },
      167 +        sizeof (int), {0} /* no ifindex */ },
 168  168  
 169      -{ IP_DONTFRAG, IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      169 +{ IP_DONTFRAG, IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 170  170  
 171  171  { IP_NEXTHOP, IPPROTO_IP, OA_R, OA_RW, OP_CONFIG, 0,
 172      -        sizeof (in_addr_t),     -1 /* not initialized  */ },
      172 +        sizeof (in_addr_t), {-1} /* not initialized  */ },
 173  173  
 174  174  { IPV6_UNSPEC_SRC, IPPROTO_IPV6, OA_R, OA_RW, OP_RAW, 0,
 175      -        sizeof (int), 0 },
      175 +        sizeof (int), {0}},
 176  176  
 177  177  { IPV6_PKTINFO, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 178  178          (OP_NODEFAULT|OP_VARLEN),
 179      -        sizeof (struct in6_pktinfo), -1 /* not initialized */ },
      179 +        sizeof (struct in6_pktinfo), {-1}/* not initialized */ },
 180  180  { IPV6_NEXTHOP, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 181  181          OP_NODEFAULT,
 182      -        sizeof (sin6_t), -1 /* not initialized */ },
      182 +        sizeof (sin6_t), {-1}/* not initialized */ },
 183  183  { IPV6_HOPOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 184  184          (OP_VARLEN|OP_NODEFAULT), 255*8,
 185      -        -1 /* not initialized */ },
      185 +        {-1} /* not initialized */ },
 186  186  { IPV6_DSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 187  187          (OP_VARLEN|OP_NODEFAULT), 255*8,
 188      -        -1 /* not initialized */ },
      188 +        {-1} /* not initialized */ },
 189  189  { IPV6_RTHDRDSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 190  190          (OP_VARLEN|OP_NODEFAULT), 255*8,
 191      -        -1 /* not initialized */ },
      191 +        {-1} /* not initialized */ },
 192  192  { IPV6_RTHDR, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 193  193          (OP_VARLEN|OP_NODEFAULT), 255*8,
 194      -        -1 /* not initialized */ },
      194 +        {-1} /* not initialized */ },
 195  195  { IPV6_TCLASS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 196  196          OP_NODEFAULT,
 197      -        sizeof (int), -1 /* not initialized */ },
      197 +        sizeof (int), {-1}/* not initialized */ },
 198  198  { IPV6_PATHMTU, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 199  199          OP_NODEFAULT,
 200      -        sizeof (struct ip6_mtuinfo), -1 /* not initialized */ },
      200 +        sizeof (struct ip6_mtuinfo), {-1}/* not initialized */ },
 201  201  { IPV6_DONTFRAG, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 202      -        sizeof (int), 0 },
      202 +        sizeof (int), {0}},
 203  203  { IPV6_USE_MIN_MTU, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 204      -        sizeof (int), 0 },
      204 +        sizeof (int), {0}},
 205  205  { IPV6_V6ONLY, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 206      -        sizeof (int), 0 },
      206 +        sizeof (int), {0}},
 207  207  
 208  208  /* Enable receipt of ancillary data */
 209  209  { IPV6_RECVPKTINFO, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 210      -        sizeof (int), 0 },
      210 +        sizeof (int), {0}},
 211  211  { IPV6_RECVHOPLIMIT, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 212      -        sizeof (int), 0 },
      212 +        sizeof (int), {0}},
 213  213  { IPV6_RECVHOPOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 214      -        sizeof (int), 0 },
      214 +        sizeof (int), {0}},
 215  215  { _OLD_IPV6_RECVDSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 216      -        sizeof (int), 0 },
      216 +        sizeof (int), {0}},
 217  217  { IPV6_RECVDSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 218      -        sizeof (int), 0 },
      218 +        sizeof (int), {0}},
 219  219  { IPV6_RECVRTHDR, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 220      -        sizeof (int), 0 },
      220 +        sizeof (int), {0}},
 221  221  { IPV6_RECVRTHDRDSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 222      -        sizeof (int), 0 },
      222 +        sizeof (int), {0}},
 223  223  { IPV6_RECVTCLASS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 224      -        sizeof (int), 0 },
      224 +        sizeof (int), {0}},
 225  225  
 226  226  { IPV6_SEC_OPT, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, OP_NODEFAULT,
 227      -        sizeof (ipsec_req_t), -1 /* not initialized */ },
      227 +        sizeof (ipsec_req_t), {-1}/* not initialized */ },
 228  228  { IPV6_SRC_PREFERENCES, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 229      -        sizeof (uint32_t), IPV6_PREFER_SRC_DEFAULT },
      229 +        sizeof (uint32_t), {IPV6_PREFER_SRC_DEFAULT} },
 230  230  };
 231  231  
 232  232  /*
 233  233   * Table of all supported levels
 234  234   * Note: Some levels (e.g. XTI_GENERIC) may be valid but may not have
 235  235   * any supported options so we need this info separately.
 236  236   *
 237  237   * This is needed only for topmost tpi providers and is used only by
 238  238   * XTI interfaces.
 239  239   */
↓ open down ↓ 849 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX