diff options
author | Mark Rustad <mark.d.rustad@intel.com> | 2014-08-05 07:56:21 -0400 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2014-08-24 13:32:34 -0400 |
commit | 94729f8a1e9d38c8df6c83799fde8d2eaef2ff54 (patch) | |
tree | ad758c897cbcb0a562ee3d5a1e5d82c0cc5184c4 | |
parent | 6e41ee684ea0c338e7d83fc88725581027856595 (diff) |
netfilter: ipset: Resolve missing-field-initializer warnings
Resolve missing-field-initializer warnings by providing a
directed initializer.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
-rw-r--r-- | net/netfilter/ipset/ip_set_bitmap_ip.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipset/ip_set_bitmap_ipmac.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipset/ip_set_bitmap_port.c | 4 | ||||
-rw-r--r-- | net/netfilter/ipset/ip_set_hash_ip.c | 8 | ||||
-rw-r--r-- | net/netfilter/ipset/ip_set_hash_ipport.c | 8 | ||||
-rw-r--r-- | net/netfilter/ipset/ip_set_hash_ipportip.c | 8 |
6 files changed, 18 insertions, 18 deletions
diff --git a/net/netfilter/ipset/ip_set_bitmap_ip.c b/net/netfilter/ipset/ip_set_bitmap_ip.c index 6f1f9f494808..dafdb39ef042 100644 --- a/net/netfilter/ipset/ip_set_bitmap_ip.c +++ b/net/netfilter/ipset/ip_set_bitmap_ip.c | |||
@@ -112,7 +112,7 @@ bitmap_ip_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
112 | { | 112 | { |
113 | struct bitmap_ip *map = set->data; | 113 | struct bitmap_ip *map = set->data; |
114 | ipset_adtfn adtfn = set->variant->adt[adt]; | 114 | ipset_adtfn adtfn = set->variant->adt[adt]; |
115 | struct bitmap_ip_adt_elem e = { }; | 115 | struct bitmap_ip_adt_elem e = { .id = 0 }; |
116 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 116 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
117 | u32 ip; | 117 | u32 ip; |
118 | 118 | ||
@@ -132,7 +132,7 @@ bitmap_ip_uadt(struct ip_set *set, struct nlattr *tb[], | |||
132 | struct bitmap_ip *map = set->data; | 132 | struct bitmap_ip *map = set->data; |
133 | ipset_adtfn adtfn = set->variant->adt[adt]; | 133 | ipset_adtfn adtfn = set->variant->adt[adt]; |
134 | u32 ip = 0, ip_to = 0; | 134 | u32 ip = 0, ip_to = 0; |
135 | struct bitmap_ip_adt_elem e = { }; | 135 | struct bitmap_ip_adt_elem e = { .id = 0 }; |
136 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 136 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
137 | int ret = 0; | 137 | int ret = 0; |
138 | 138 | ||
diff --git a/net/netfilter/ipset/ip_set_bitmap_ipmac.c b/net/netfilter/ipset/ip_set_bitmap_ipmac.c index 740eabededd9..dbad505e79e3 100644 --- a/net/netfilter/ipset/ip_set_bitmap_ipmac.c +++ b/net/netfilter/ipset/ip_set_bitmap_ipmac.c | |||
@@ -203,7 +203,7 @@ bitmap_ipmac_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
203 | { | 203 | { |
204 | struct bitmap_ipmac *map = set->data; | 204 | struct bitmap_ipmac *map = set->data; |
205 | ipset_adtfn adtfn = set->variant->adt[adt]; | 205 | ipset_adtfn adtfn = set->variant->adt[adt]; |
206 | struct bitmap_ipmac_adt_elem e = {}; | 206 | struct bitmap_ipmac_adt_elem e = { .id = 0 }; |
207 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 207 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
208 | u32 ip; | 208 | u32 ip; |
209 | 209 | ||
@@ -232,7 +232,7 @@ bitmap_ipmac_uadt(struct ip_set *set, struct nlattr *tb[], | |||
232 | { | 232 | { |
233 | const struct bitmap_ipmac *map = set->data; | 233 | const struct bitmap_ipmac *map = set->data; |
234 | ipset_adtfn adtfn = set->variant->adt[adt]; | 234 | ipset_adtfn adtfn = set->variant->adt[adt]; |
235 | struct bitmap_ipmac_adt_elem e = {}; | 235 | struct bitmap_ipmac_adt_elem e = { .id = 0 }; |
236 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 236 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
237 | u32 ip = 0; | 237 | u32 ip = 0; |
238 | int ret = 0; | 238 | int ret = 0; |
diff --git a/net/netfilter/ipset/ip_set_bitmap_port.c b/net/netfilter/ipset/ip_set_bitmap_port.c index cf99676e69f8..a4b65ae1986c 100644 --- a/net/netfilter/ipset/ip_set_bitmap_port.c +++ b/net/netfilter/ipset/ip_set_bitmap_port.c | |||
@@ -104,7 +104,7 @@ bitmap_port_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
104 | { | 104 | { |
105 | struct bitmap_port *map = set->data; | 105 | struct bitmap_port *map = set->data; |
106 | ipset_adtfn adtfn = set->variant->adt[adt]; | 106 | ipset_adtfn adtfn = set->variant->adt[adt]; |
107 | struct bitmap_port_adt_elem e = {}; | 107 | struct bitmap_port_adt_elem e = { .id = 0 }; |
108 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 108 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
109 | __be16 __port; | 109 | __be16 __port; |
110 | u16 port = 0; | 110 | u16 port = 0; |
@@ -129,7 +129,7 @@ bitmap_port_uadt(struct ip_set *set, struct nlattr *tb[], | |||
129 | { | 129 | { |
130 | struct bitmap_port *map = set->data; | 130 | struct bitmap_port *map = set->data; |
131 | ipset_adtfn adtfn = set->variant->adt[adt]; | 131 | ipset_adtfn adtfn = set->variant->adt[adt]; |
132 | struct bitmap_port_adt_elem e = {}; | 132 | struct bitmap_port_adt_elem e = { .id = 0 }; |
133 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 133 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
134 | u32 port; /* wraparound */ | 134 | u32 port; /* wraparound */ |
135 | u16 port_to; | 135 | u16 port_to; |
diff --git a/net/netfilter/ipset/ip_set_hash_ip.c b/net/netfilter/ipset/ip_set_hash_ip.c index dd40607f878e..e52739938533 100644 --- a/net/netfilter/ipset/ip_set_hash_ip.c +++ b/net/netfilter/ipset/ip_set_hash_ip.c | |||
@@ -84,7 +84,7 @@ hash_ip4_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
84 | { | 84 | { |
85 | const struct hash_ip *h = set->data; | 85 | const struct hash_ip *h = set->data; |
86 | ipset_adtfn adtfn = set->variant->adt[adt]; | 86 | ipset_adtfn adtfn = set->variant->adt[adt]; |
87 | struct hash_ip4_elem e = {}; | 87 | struct hash_ip4_elem e = { 0 }; |
88 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 88 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
89 | __be32 ip; | 89 | __be32 ip; |
90 | 90 | ||
@@ -103,7 +103,7 @@ hash_ip4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
103 | { | 103 | { |
104 | const struct hash_ip *h = set->data; | 104 | const struct hash_ip *h = set->data; |
105 | ipset_adtfn adtfn = set->variant->adt[adt]; | 105 | ipset_adtfn adtfn = set->variant->adt[adt]; |
106 | struct hash_ip4_elem e = {}; | 106 | struct hash_ip4_elem e = { 0 }; |
107 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 107 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
108 | u32 ip = 0, ip_to = 0, hosts; | 108 | u32 ip = 0, ip_to = 0, hosts; |
109 | int ret = 0; | 109 | int ret = 0; |
@@ -222,7 +222,7 @@ hash_ip6_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
222 | { | 222 | { |
223 | const struct hash_ip *h = set->data; | 223 | const struct hash_ip *h = set->data; |
224 | ipset_adtfn adtfn = set->variant->adt[adt]; | 224 | ipset_adtfn adtfn = set->variant->adt[adt]; |
225 | struct hash_ip6_elem e = {}; | 225 | struct hash_ip6_elem e = { { .all = { 0 } } }; |
226 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 226 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
227 | 227 | ||
228 | ip6addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip.in6); | 228 | ip6addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip.in6); |
@@ -239,7 +239,7 @@ hash_ip6_uadt(struct ip_set *set, struct nlattr *tb[], | |||
239 | { | 239 | { |
240 | const struct hash_ip *h = set->data; | 240 | const struct hash_ip *h = set->data; |
241 | ipset_adtfn adtfn = set->variant->adt[adt]; | 241 | ipset_adtfn adtfn = set->variant->adt[adt]; |
242 | struct hash_ip6_elem e = {}; | 242 | struct hash_ip6_elem e = { { .all = { 0 } } }; |
243 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 243 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
244 | int ret; | 244 | int ret; |
245 | 245 | ||
diff --git a/net/netfilter/ipset/ip_set_hash_ipport.c b/net/netfilter/ipset/ip_set_hash_ipport.c index 7597b82a8b03..f37a5ae8a5e0 100644 --- a/net/netfilter/ipset/ip_set_hash_ipport.c +++ b/net/netfilter/ipset/ip_set_hash_ipport.c | |||
@@ -94,7 +94,7 @@ hash_ipport4_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
94 | enum ipset_adt adt, struct ip_set_adt_opt *opt) | 94 | enum ipset_adt adt, struct ip_set_adt_opt *opt) |
95 | { | 95 | { |
96 | ipset_adtfn adtfn = set->variant->adt[adt]; | 96 | ipset_adtfn adtfn = set->variant->adt[adt]; |
97 | struct hash_ipport4_elem e = { }; | 97 | struct hash_ipport4_elem e = { .ip = 0 }; |
98 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 98 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
99 | 99 | ||
100 | if (!ip_set_get_ip4_port(skb, opt->flags & IPSET_DIM_TWO_SRC, | 100 | if (!ip_set_get_ip4_port(skb, opt->flags & IPSET_DIM_TWO_SRC, |
@@ -111,7 +111,7 @@ hash_ipport4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
111 | { | 111 | { |
112 | const struct hash_ipport *h = set->data; | 112 | const struct hash_ipport *h = set->data; |
113 | ipset_adtfn adtfn = set->variant->adt[adt]; | 113 | ipset_adtfn adtfn = set->variant->adt[adt]; |
114 | struct hash_ipport4_elem e = { }; | 114 | struct hash_ipport4_elem e = { .ip = 0 }; |
115 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 115 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
116 | u32 ip, ip_to = 0, p = 0, port, port_to; | 116 | u32 ip, ip_to = 0, p = 0, port, port_to; |
117 | bool with_ports = false; | 117 | bool with_ports = false; |
@@ -258,7 +258,7 @@ hash_ipport6_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
258 | enum ipset_adt adt, struct ip_set_adt_opt *opt) | 258 | enum ipset_adt adt, struct ip_set_adt_opt *opt) |
259 | { | 259 | { |
260 | ipset_adtfn adtfn = set->variant->adt[adt]; | 260 | ipset_adtfn adtfn = set->variant->adt[adt]; |
261 | struct hash_ipport6_elem e = { }; | 261 | struct hash_ipport6_elem e = { .ip = { .all = { 0 } } }; |
262 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 262 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
263 | 263 | ||
264 | if (!ip_set_get_ip6_port(skb, opt->flags & IPSET_DIM_TWO_SRC, | 264 | if (!ip_set_get_ip6_port(skb, opt->flags & IPSET_DIM_TWO_SRC, |
@@ -275,7 +275,7 @@ hash_ipport6_uadt(struct ip_set *set, struct nlattr *tb[], | |||
275 | { | 275 | { |
276 | const struct hash_ipport *h = set->data; | 276 | const struct hash_ipport *h = set->data; |
277 | ipset_adtfn adtfn = set->variant->adt[adt]; | 277 | ipset_adtfn adtfn = set->variant->adt[adt]; |
278 | struct hash_ipport6_elem e = { }; | 278 | struct hash_ipport6_elem e = { .ip = { .all = { 0 } } }; |
279 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 279 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
280 | u32 port, port_to; | 280 | u32 port, port_to; |
281 | bool with_ports = false; | 281 | bool with_ports = false; |
diff --git a/net/netfilter/ipset/ip_set_hash_ipportip.c b/net/netfilter/ipset/ip_set_hash_ipportip.c index 672655ffd573..41ef00eda874 100644 --- a/net/netfilter/ipset/ip_set_hash_ipportip.c +++ b/net/netfilter/ipset/ip_set_hash_ipportip.c | |||
@@ -95,7 +95,7 @@ hash_ipportip4_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
95 | enum ipset_adt adt, struct ip_set_adt_opt *opt) | 95 | enum ipset_adt adt, struct ip_set_adt_opt *opt) |
96 | { | 96 | { |
97 | ipset_adtfn adtfn = set->variant->adt[adt]; | 97 | ipset_adtfn adtfn = set->variant->adt[adt]; |
98 | struct hash_ipportip4_elem e = { }; | 98 | struct hash_ipportip4_elem e = { .ip = 0 }; |
99 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 99 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
100 | 100 | ||
101 | if (!ip_set_get_ip4_port(skb, opt->flags & IPSET_DIM_TWO_SRC, | 101 | if (!ip_set_get_ip4_port(skb, opt->flags & IPSET_DIM_TWO_SRC, |
@@ -113,7 +113,7 @@ hash_ipportip4_uadt(struct ip_set *set, struct nlattr *tb[], | |||
113 | { | 113 | { |
114 | const struct hash_ipportip *h = set->data; | 114 | const struct hash_ipportip *h = set->data; |
115 | ipset_adtfn adtfn = set->variant->adt[adt]; | 115 | ipset_adtfn adtfn = set->variant->adt[adt]; |
116 | struct hash_ipportip4_elem e = { }; | 116 | struct hash_ipportip4_elem e = { .ip = 0 }; |
117 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 117 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
118 | u32 ip, ip_to = 0, p = 0, port, port_to; | 118 | u32 ip, ip_to = 0, p = 0, port, port_to; |
119 | bool with_ports = false; | 119 | bool with_ports = false; |
@@ -265,7 +265,7 @@ hash_ipportip6_kadt(struct ip_set *set, const struct sk_buff *skb, | |||
265 | enum ipset_adt adt, struct ip_set_adt_opt *opt) | 265 | enum ipset_adt adt, struct ip_set_adt_opt *opt) |
266 | { | 266 | { |
267 | ipset_adtfn adtfn = set->variant->adt[adt]; | 267 | ipset_adtfn adtfn = set->variant->adt[adt]; |
268 | struct hash_ipportip6_elem e = { }; | 268 | struct hash_ipportip6_elem e = { .ip = { .all = { 0 } } }; |
269 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); | 269 | struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); |
270 | 270 | ||
271 | if (!ip_set_get_ip6_port(skb, opt->flags & IPSET_DIM_TWO_SRC, | 271 | if (!ip_set_get_ip6_port(skb, opt->flags & IPSET_DIM_TWO_SRC, |
@@ -283,7 +283,7 @@ hash_ipportip6_uadt(struct ip_set *set, struct nlattr *tb[], | |||
283 | { | 283 | { |
284 | const struct hash_ipportip *h = set->data; | 284 | const struct hash_ipportip *h = set->data; |
285 | ipset_adtfn adtfn = set->variant->adt[adt]; | 285 | ipset_adtfn adtfn = set->variant->adt[adt]; |
286 | struct hash_ipportip6_elem e = { }; | 286 | struct hash_ipportip6_elem e = { .ip = { .all = { 0 } } }; |
287 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); | 287 | struct ip_set_ext ext = IP_SET_INIT_UEXT(set); |
288 | u32 port, port_to; | 288 | u32 port, port_to; |
289 | bool with_ports = false; | 289 | bool with_ports = false; |