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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/sctp/sctp_opt_data.c
          +++ new/usr/src/uts/common/inet/sctp/sctp_opt_data.c
↓ open down ↓ 604 lines elided ↑ open up ↑
 605  605  /*
 606  606   * Table of all known options handled on a SCTP protocol stack.
 607  607   *
 608  608   * Note: This table contains options processed by both SCTP and IP levels
 609  609   *       and is the superset of options that can be performed on a SCTP and IP
 610  610   *       stack.
 611  611   */
 612  612  opdes_t sctp_opt_arr[] = {
 613  613  
 614  614  { SO_LINGER,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0,
 615      -        sizeof (struct linger), 0 },
      615 +        sizeof (struct linger), {0}},
 616  616  
 617      -{ SO_DEBUG,     SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 618      -{ SO_KEEPALIVE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 619      -{ SO_DONTROUTE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 620      -{ SO_USELOOPBACK, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0
      617 +{ SO_DEBUG,     SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      618 +{ SO_KEEPALIVE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      619 +{ SO_DONTROUTE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      620 +{ SO_USELOOPBACK, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}
 621  621          },
 622      -{ SO_BROADCAST, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 623      -{ SO_REUSEADDR, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 624      -{ SO_OOBINLINE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 625      -{ SO_TYPE,      SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
 626      -{ SO_SNDBUF,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 627      -{ SO_RCVBUF,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 628      -{ SO_DGRAM_ERRIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0
      622 +{ SO_BROADCAST, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      623 +{ SO_REUSEADDR, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      624 +{ SO_OOBINLINE, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      625 +{ SO_TYPE,      SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), {0}},
      626 +{ SO_SNDBUF,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      627 +{ SO_RCVBUF,    SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      628 +{ SO_DGRAM_ERRIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}
 629  629          },
 630      -{ SO_SND_COPYAVOID, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      630 +{ SO_SND_COPYAVOID, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 631  631  { SO_ANON_MLP, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int),
 632      -        0 },
      632 +        {0}},
 633  633  { SO_MAC_EXEMPT, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int),
 634      -        0 },
      634 +        {0}},
 635  635  { SO_ALLZONES, SOL_SOCKET, OA_R, OA_RW, OP_CONFIG, 0, sizeof (int),
 636      -        0 },
 637      -{ SO_EXCLBIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      636 +        {0}},
      637 +{ SO_EXCLBIND, SOL_SOCKET, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 638  638  
 639      -{ SO_DOMAIN,    SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
      639 +{ SO_DOMAIN,    SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), {0}},
 640  640  
 641      -{ SO_PROTOTYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
      641 +{ SO_PROTOTYPE, SOL_SOCKET, OA_R, OA_R, OP_NP, 0, sizeof (int), {0}},
 642  642  
 643  643  { SCTP_ADAPTATION_LAYER, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 644      -        sizeof (struct sctp_setadaptation), 0 },
      644 +        sizeof (struct sctp_setadaptation), {0}},
 645  645  { SCTP_ADD_ADDR, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, OP_VARLEN,
 646      -        sizeof (int), 0 },
      646 +        sizeof (int), {0}},
 647  647  { SCTP_ASSOCINFO, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 648      -        sizeof (struct sctp_assocparams), 0 },
 649      -{ SCTP_AUTOCLOSE, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      648 +        sizeof (struct sctp_assocparams), {0}},
      649 +{ SCTP_AUTOCLOSE, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 650  650  { SCTP_DEFAULT_SEND_PARAM, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 651      -        sizeof (struct sctp_sndrcvinfo), 0 },
      651 +        sizeof (struct sctp_sndrcvinfo), {0}},
 652  652  { SCTP_DISABLE_FRAGMENTS, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 653      -        sizeof (int), 0 },
      653 +        sizeof (int), {0}},
 654  654  { SCTP_EVENTS, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 655      -        sizeof (struct sctp_event_subscribe), 0 },
      655 +        sizeof (struct sctp_event_subscribe), {0}},
 656  656  { SCTP_GET_LADDRS, IPPROTO_SCTP, OA_R, OA_R, OP_NP, OP_VARLEN,
 657      -        sizeof (int), 0 },
 658      -{ SCTP_GET_NLADDRS, IPPROTO_SCTP, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
 659      -{ SCTP_GET_NPADDRS, IPPROTO_SCTP, OA_R, OA_R, OP_NP, 0, sizeof (int), 0 },
      657 +        sizeof (int), {0}},
      658 +{ SCTP_GET_NLADDRS, IPPROTO_SCTP, OA_R, OA_R, OP_NP, 0, sizeof (int), {0}},
      659 +{ SCTP_GET_NPADDRS, IPPROTO_SCTP, OA_R, OA_R, OP_NP, 0, sizeof (int), {0}},
 660  660  { SCTP_GET_PADDRS, IPPROTO_SCTP, OA_R, OA_R, OP_NP, OP_VARLEN,
 661      -        sizeof (int), 0 },
      661 +        sizeof (int), {0}},
 662  662  { SCTP_GET_PEER_ADDR_INFO, IPPROTO_SCTP, OA_R, OA_R, OP_NP, 0,
 663      -        sizeof (struct sctp_paddrinfo), 0 },
      663 +        sizeof (struct sctp_paddrinfo), {0}},
 664  664  { SCTP_INITMSG, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 665      -        sizeof (struct sctp_initmsg), 0 },
      665 +        sizeof (struct sctp_initmsg), {0}},
 666  666  { SCTP_I_WANT_MAPPED_V4_ADDR, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 667      -        sizeof (int), 0 },
 668      -{ SCTP_MAXSEG, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 669      -{ SCTP_NODELAY, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      667 +        sizeof (int), {0}},
      668 +{ SCTP_MAXSEG, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      669 +{ SCTP_NODELAY, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 670  670  { SCTP_PEER_ADDR_PARAMS, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 671      -        sizeof (struct sctp_paddrparams), 0 },
      671 +        sizeof (struct sctp_paddrparams), {0}},
 672  672  { SCTP_PRIMARY_ADDR, IPPROTO_SCTP, OA_W, OA_W, OP_NP, 0,
 673      -        sizeof (struct sctp_setpeerprim), 0 },
 674      -{ SCTP_PRSCTP, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      673 +        sizeof (struct sctp_setpeerprim), {0}},
      674 +{ SCTP_PRSCTP, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 675  675  { SCTP_GET_ASSOC_STATS, IPPROTO_SCTP, OA_R, OA_R, OP_NP, 0,
 676      -        sizeof (sctp_assoc_stats_t), 0 },
      676 +        sizeof (sctp_assoc_stats_t), {0}},
 677  677  { SCTP_REM_ADDR, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, OP_VARLEN,
 678      -        sizeof (int), 0 },
      678 +        sizeof (int), {0}},
 679  679  { SCTP_RTOINFO, IPPROTO_SCTP, OA_RW, OA_RW, OP_NP, 0,
 680      -        sizeof (struct sctp_rtoinfo), 0 },
      680 +        sizeof (struct sctp_rtoinfo), {0}},
 681  681  { SCTP_SET_PEER_PRIMARY_ADDR, IPPROTO_SCTP, OA_W, OA_W, OP_NP, 0,
 682      -        sizeof (struct sctp_setprim), 0 },
      682 +        sizeof (struct sctp_setprim), {0}},
 683  683  { SCTP_STATUS, IPPROTO_SCTP, OA_R, OA_R, OP_NP, 0,
 684      -        sizeof (struct sctp_status), 0 },
      684 +        sizeof (struct sctp_status), {0}},
 685  685  { SCTP_UC_SWAP, IPPROTO_SCTP, OA_W, OA_W, OP_NP, 0,
 686      -        sizeof (struct sctp_uc_swap), 0 },
      686 +        sizeof (struct sctp_uc_swap), {0}},
 687  687  
 688  688  { IP_OPTIONS,   IPPROTO_IP, OA_RW, OA_RW, OP_NP,
 689  689          (OP_VARLEN|OP_NODEFAULT),
 690      -        40, -1 /* not initialized */ },
      690 +        40, {-1} /* not initialized */ },
 691  691  { T_IP_OPTIONS, IPPROTO_IP, OA_RW, OA_RW, OP_NP,
 692  692          (OP_VARLEN|OP_NODEFAULT),
 693      -        40, -1 /* not initialized */ },
      693 +        40, {-1} /* not initialized */ },
 694  694  
 695      -{ IP_TOS,       IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
 696      -{ T_IP_TOS,     IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      695 +{ IP_TOS,       IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
      696 +{ T_IP_TOS,     IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 697  697  { IP_TTL,       IPPROTO_IP, OA_RW, OA_RW, OP_NP, OP_DEF_FN,
 698      -        sizeof (int), -1 /* not initialized */ },
      698 +        sizeof (int), {-1}/* not initialized */ },
 699  699  
 700  700  { IP_SEC_OPT, IPPROTO_IP, OA_RW, OA_RW, OP_NP, OP_NODEFAULT,
 701      -        sizeof (ipsec_req_t), -1 /* not initialized */ },
      701 +        sizeof (ipsec_req_t), {-1}/* not initialized */ },
 702  702  
 703  703  { IP_BOUND_IF, IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0,
 704      -        sizeof (int),   0 /* no ifindex */ },
      704 +        sizeof (int),   {0}/* no ifindex */ },
 705  705  
 706  706  { IP_UNSPEC_SRC, IPPROTO_IP, OA_R, OA_RW, OP_RAW, 0,
 707      -        sizeof (int), 0 },
      707 +        sizeof (int), {0}},
 708  708  
 709  709  { IPV6_UNICAST_HOPS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, OP_DEF_FN,
 710      -        sizeof (int), -1 /* not initialized */ },
      710 +        sizeof (int), {-1}/* not initialized */ },
 711  711  
 712  712  { IPV6_BOUND_IF, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 713      -        sizeof (int),   0 /* no ifindex */ },
      713 +        sizeof (int),   {0}/* no ifindex */ },
 714  714  
 715      -{ IP_DONTFRAG, IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), 0 },
      715 +{ IP_DONTFRAG, IPPROTO_IP, OA_RW, OA_RW, OP_NP, 0, sizeof (int), {0}},
 716  716  
 717  717  { IP_NEXTHOP, IPPROTO_IP, OA_R, OA_RW, OP_CONFIG, 0,
 718      -        sizeof (in_addr_t),     -1 /* not initialized  */ },
      718 +        sizeof (in_addr_t),     {-1}/* not initialized  */ },
 719  719  
 720  720  { IPV6_UNSPEC_SRC, IPPROTO_IPV6, OA_R, OA_RW, OP_RAW, 0,
 721      -        sizeof (int), 0 },
      721 +        sizeof (int), {0}},
 722  722  
 723  723  { IPV6_PKTINFO, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 724  724          (OP_NODEFAULT|OP_VARLEN),
 725      -        sizeof (struct in6_pktinfo), -1 /* not initialized */ },
      725 +        sizeof (struct in6_pktinfo), {-1}/* not initialized */ },
 726  726  { IPV6_NEXTHOP, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 727  727          OP_NODEFAULT,
 728      -        sizeof (sin6_t), -1 /* not initialized */ },
      728 +        sizeof (sin6_t), {-1}/* not initialized */ },
 729  729  { IPV6_HOPOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 730  730          (OP_VARLEN|OP_NODEFAULT), 255*8,
 731      -        -1 /* not initialized */ },
      731 +        {-1}/* not initialized */ },
 732  732  { IPV6_DSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 733  733          (OP_VARLEN|OP_NODEFAULT), 255*8,
 734      -        -1 /* not initialized */ },
      734 +        {-1}/* not initialized */ },
 735  735  { IPV6_RTHDRDSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 736  736          (OP_VARLEN|OP_NODEFAULT), 255*8,
 737      -        -1 /* not initialized */ },
      737 +        {-1}/* not initialized */ },
 738  738  { IPV6_RTHDR, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 739  739          (OP_VARLEN|OP_NODEFAULT), 255*8,
 740      -        -1 /* not initialized */ },
      740 +        {-1}/* not initialized */ },
 741  741  { IPV6_TCLASS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 742  742          OP_NODEFAULT,
 743      -        sizeof (int), -1 /* not initialized */ },
      743 +        sizeof (int), {-1}/* not initialized */ },
 744  744  { IPV6_PATHMTU, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP,
 745  745          OP_NODEFAULT,
 746      -        sizeof (struct ip6_mtuinfo), -1 /* not initialized */ },
      746 +        sizeof (struct ip6_mtuinfo), {-1}/* not initialized */ },
 747  747  { IPV6_DONTFRAG, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 748      -        sizeof (int), 0 },
      748 +        sizeof (int), {0}},
 749  749  { IPV6_USE_MIN_MTU, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 750      -        sizeof (int), 0 },
      750 +        sizeof (int), {0}},
 751  751  { IPV6_V6ONLY, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 752      -        sizeof (int), 0 },
      752 +        sizeof (int), {0}},
 753  753  
 754  754  /* Enable receipt of ancillary data */
 755  755  { IPV6_RECVPKTINFO, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 756      -        sizeof (int), 0 },
      756 +        sizeof (int), {0}},
 757  757  { IPV6_RECVHOPLIMIT, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 758      -        sizeof (int), 0 },
      758 +        sizeof (int), {0}},
 759  759  { IPV6_RECVTCLASS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 760      -        sizeof (int), 0 },
      760 +        sizeof (int), {0}},
 761  761  { IPV6_RECVHOPOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 762      -        sizeof (int), 0 },
      762 +        sizeof (int), {0}},
 763  763  { _OLD_IPV6_RECVDSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 764      -        sizeof (int), 0 },
      764 +        sizeof (int), {0}},
 765  765  { IPV6_RECVDSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 766      -        sizeof (int), 0 },
      766 +        sizeof (int), {0}},
 767  767  { IPV6_RECVRTHDR, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 768      -        sizeof (int), 0 },
      768 +        sizeof (int), {0}},
 769  769  { IPV6_RECVRTHDRDSTOPTS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 770      -        sizeof (int), 0 },
      770 +        sizeof (int), {0}},
 771  771  { IPV6_RECVTCLASS, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 772      -        sizeof (int), 0 },
      772 +        sizeof (int), {0}},
 773  773  
 774  774  { IPV6_SEC_OPT, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, OP_NODEFAULT,
 775      -        sizeof (ipsec_req_t), -1 /* not initialized */ },
      775 +        sizeof (ipsec_req_t), {-1}/* not initialized */ },
 776  776  { IPV6_SRC_PREFERENCES, IPPROTO_IPV6, OA_RW, OA_RW, OP_NP, 0,
 777      -        sizeof (uint32_t), IPV6_PREFER_SRC_DEFAULT },
      777 +        sizeof (uint32_t), {IPV6_PREFER_SRC_DEFAULT} },
 778  778  };
 779  779  
 780  780  uint_t sctp_opt_arr_size = A_CNT(sctp_opt_arr);
 781  781  
 782  782  /* Handy on off switch for socket option processing. */
 783  783  #define ONOFF(x)        ((x) == 0 ? 0 : 1)
 784  784  
 785  785  /*
 786  786   * SCTP routine to get the values of options.
 787  787   */
↓ open down ↓ 750 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX