Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Mark Rustad and committed by
Jozsef Kadlecsik
94729f8a 6e41ee68

+18 -18
+2 -2
net/netfilter/ipset/ip_set_bitmap_ip.c
··· 112 112 { 113 113 struct bitmap_ip *map = set->data; 114 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 116 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 117 117 u32 ip; 118 118 ··· 132 132 struct bitmap_ip *map = set->data; 133 133 ipset_adtfn adtfn = set->variant->adt[adt]; 134 134 u32 ip = 0, ip_to = 0; 135 - struct bitmap_ip_adt_elem e = { }; 135 + struct bitmap_ip_adt_elem e = { .id = 0 }; 136 136 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 137 137 int ret = 0; 138 138
+2 -2
net/netfilter/ipset/ip_set_bitmap_ipmac.c
··· 203 203 { 204 204 struct bitmap_ipmac *map = set->data; 205 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 207 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 208 208 u32 ip; 209 209 ··· 232 232 { 233 233 const struct bitmap_ipmac *map = set->data; 234 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 236 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 237 237 u32 ip = 0; 238 238 int ret = 0;
+2 -2
net/netfilter/ipset/ip_set_bitmap_port.c
··· 104 104 { 105 105 struct bitmap_port *map = set->data; 106 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 108 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 109 109 __be16 __port; 110 110 u16 port = 0; ··· 129 129 { 130 130 struct bitmap_port *map = set->data; 131 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 133 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 134 134 u32 port; /* wraparound */ 135 135 u16 port_to;
+4 -4
net/netfilter/ipset/ip_set_hash_ip.c
··· 84 84 { 85 85 const struct hash_ip *h = set->data; 86 86 ipset_adtfn adtfn = set->variant->adt[adt]; 87 - struct hash_ip4_elem e = {}; 87 + struct hash_ip4_elem e = { 0 }; 88 88 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 89 89 __be32 ip; 90 90 ··· 103 103 { 104 104 const struct hash_ip *h = set->data; 105 105 ipset_adtfn adtfn = set->variant->adt[adt]; 106 - struct hash_ip4_elem e = {}; 106 + struct hash_ip4_elem e = { 0 }; 107 107 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 108 108 u32 ip = 0, ip_to = 0, hosts; 109 109 int ret = 0; ··· 222 222 { 223 223 const struct hash_ip *h = set->data; 224 224 ipset_adtfn adtfn = set->variant->adt[adt]; 225 - struct hash_ip6_elem e = {}; 225 + struct hash_ip6_elem e = { { .all = { 0 } } }; 226 226 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 227 227 228 228 ip6addrptr(skb, opt->flags & IPSET_DIM_ONE_SRC, &e.ip.in6); ··· 239 239 { 240 240 const struct hash_ip *h = set->data; 241 241 ipset_adtfn adtfn = set->variant->adt[adt]; 242 - struct hash_ip6_elem e = {}; 242 + struct hash_ip6_elem e = { { .all = { 0 } } }; 243 243 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 244 244 int ret; 245 245
+4 -4
net/netfilter/ipset/ip_set_hash_ipport.c
··· 94 94 enum ipset_adt adt, struct ip_set_adt_opt *opt) 95 95 { 96 96 ipset_adtfn adtfn = set->variant->adt[adt]; 97 - struct hash_ipport4_elem e = { }; 97 + struct hash_ipport4_elem e = { .ip = 0 }; 98 98 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 99 99 100 100 if (!ip_set_get_ip4_port(skb, opt->flags & IPSET_DIM_TWO_SRC, ··· 111 111 { 112 112 const struct hash_ipport *h = set->data; 113 113 ipset_adtfn adtfn = set->variant->adt[adt]; 114 - struct hash_ipport4_elem e = { }; 114 + struct hash_ipport4_elem e = { .ip = 0 }; 115 115 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 116 116 u32 ip, ip_to = 0, p = 0, port, port_to; 117 117 bool with_ports = false; ··· 258 258 enum ipset_adt adt, struct ip_set_adt_opt *opt) 259 259 { 260 260 ipset_adtfn adtfn = set->variant->adt[adt]; 261 - struct hash_ipport6_elem e = { }; 261 + struct hash_ipport6_elem e = { .ip = { .all = { 0 } } }; 262 262 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 263 263 264 264 if (!ip_set_get_ip6_port(skb, opt->flags & IPSET_DIM_TWO_SRC, ··· 275 275 { 276 276 const struct hash_ipport *h = set->data; 277 277 ipset_adtfn adtfn = set->variant->adt[adt]; 278 - struct hash_ipport6_elem e = { }; 278 + struct hash_ipport6_elem e = { .ip = { .all = { 0 } } }; 279 279 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 280 280 u32 port, port_to; 281 281 bool with_ports = false;
+4 -4
net/netfilter/ipset/ip_set_hash_ipportip.c
··· 95 95 enum ipset_adt adt, struct ip_set_adt_opt *opt) 96 96 { 97 97 ipset_adtfn adtfn = set->variant->adt[adt]; 98 - struct hash_ipportip4_elem e = { }; 98 + struct hash_ipportip4_elem e = { .ip = 0 }; 99 99 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 100 100 101 101 if (!ip_set_get_ip4_port(skb, opt->flags & IPSET_DIM_TWO_SRC, ··· 113 113 { 114 114 const struct hash_ipportip *h = set->data; 115 115 ipset_adtfn adtfn = set->variant->adt[adt]; 116 - struct hash_ipportip4_elem e = { }; 116 + struct hash_ipportip4_elem e = { .ip = 0 }; 117 117 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 118 118 u32 ip, ip_to = 0, p = 0, port, port_to; 119 119 bool with_ports = false; ··· 265 265 enum ipset_adt adt, struct ip_set_adt_opt *opt) 266 266 { 267 267 ipset_adtfn adtfn = set->variant->adt[adt]; 268 - struct hash_ipportip6_elem e = { }; 268 + struct hash_ipportip6_elem e = { .ip = { .all = { 0 } } }; 269 269 struct ip_set_ext ext = IP_SET_INIT_KEXT(skb, opt, set); 270 270 271 271 if (!ip_set_get_ip6_port(skb, opt->flags & IPSET_DIM_TWO_SRC, ··· 283 283 { 284 284 const struct hash_ipportip *h = set->data; 285 285 ipset_adtfn adtfn = set->variant->adt[adt]; 286 - struct hash_ipportip6_elem e = { }; 286 + struct hash_ipportip6_elem e = { .ip = { .all = { 0 } } }; 287 287 struct ip_set_ext ext = IP_SET_INIT_UEXT(set); 288 288 u32 port, port_to; 289 289 bool with_ports = false;