From: Ben Pfaff Date: Thu, 8 Jan 2009 23:19:50 +0000 (-0800) Subject: Add missing trailing initializers. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aad6330f89a3e7ba800583a007ec303dd3331f4;p=openvswitch Add missing trailing initializers. Found with -Wmissing-field-initializers. --- diff --git a/lib/vconn-tcp.c b/lib/vconn-tcp.c index 4049f00c..ed6072ab 100644 --- a/lib/vconn-tcp.c +++ b/lib/vconn-tcp.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -196,5 +196,8 @@ ptcp_accept(int fd, const struct sockaddr *sa, size_t sa_len, struct pvconn_class ptcp_pvconn_class = { "ptcp", ptcp_open, + NULL, + NULL, + NULL }; diff --git a/utilities/dpctl.c b/utilities/dpctl.c index f9d581c2..99065141 100644 --- a/utilities/dpctl.c +++ b/utilities/dpctl.c @@ -723,8 +723,8 @@ static bool parse_protocol(const char *name, const struct protocol **p_out) { static const struct protocol protocols[] = { - { "ip", ETH_TYPE_IP }, - { "arp", ETH_TYPE_ARP }, + { "ip", ETH_TYPE_IP, 0 }, + { "arp", ETH_TYPE_ARP, 0 }, { "icmp", ETH_TYPE_IP, IP_TYPE_ICMP }, { "tcp", ETH_TYPE_IP, IP_TYPE_TCP }, { "udp", ETH_TYPE_IP, IP_TYPE_UDP }, @@ -753,20 +753,20 @@ parse_field(const char *name, const struct field **f_out) { #define F_OFS(MEMBER) offsetof(struct ofp_match, MEMBER) static const struct field fields[] = { - { "in_port", OFPFW_IN_PORT, F_U16, F_OFS(in_port) }, - { "dl_vlan", OFPFW_DL_VLAN, F_U16, F_OFS(dl_vlan) }, - { "dl_src", OFPFW_DL_SRC, F_MAC, F_OFS(dl_src) }, - { "dl_dst", OFPFW_DL_DST, F_MAC, F_OFS(dl_dst) }, - { "dl_type", OFPFW_DL_TYPE, F_U16, F_OFS(dl_type) }, + { "in_port", OFPFW_IN_PORT, F_U16, F_OFS(in_port), 0 }, + { "dl_vlan", OFPFW_DL_VLAN, F_U16, F_OFS(dl_vlan), 0 }, + { "dl_src", OFPFW_DL_SRC, F_MAC, F_OFS(dl_src), 0 }, + { "dl_dst", OFPFW_DL_DST, F_MAC, F_OFS(dl_dst), 0 }, + { "dl_type", OFPFW_DL_TYPE, F_U16, F_OFS(dl_type), 0 }, { "nw_src", OFPFW_NW_SRC_MASK, F_IP, F_OFS(nw_src), OFPFW_NW_SRC_SHIFT }, { "nw_dst", OFPFW_NW_DST_MASK, F_IP, F_OFS(nw_dst), OFPFW_NW_DST_SHIFT }, - { "nw_proto", OFPFW_NW_PROTO, F_U8, F_OFS(nw_proto) }, - { "tp_src", OFPFW_TP_SRC, F_U16, F_OFS(tp_src) }, - { "tp_dst", OFPFW_TP_DST, F_U16, F_OFS(tp_dst) }, - { "icmp_type", OFPFW_ICMP_TYPE, F_U16, F_OFS(icmp_type) }, - { "icmp_code", OFPFW_ICMP_CODE, F_U16, F_OFS(icmp_code) } + { "nw_proto", OFPFW_NW_PROTO, F_U8, F_OFS(nw_proto), 0 }, + { "tp_src", OFPFW_TP_SRC, F_U16, F_OFS(tp_src), 0 }, + { "tp_dst", OFPFW_TP_DST, F_U16, F_OFS(tp_dst), 0 }, + { "icmp_type", OFPFW_ICMP_TYPE, F_U16, F_OFS(icmp_type), 0 }, + { "icmp_code", OFPFW_ICMP_CODE, F_U16, F_OFS(icmp_code), 0 } }; const struct field *f;