ofproto-dpif-xlate: Fix compilation with GCC 4.6.
authorBen Pfaff <blp@ovn.org>
Tue, 17 May 2016 23:29:39 +0000 (16:29 -0700)
committerBen Pfaff <blp@ovn.org>
Wed, 18 May 2016 02:01:57 +0000 (19:01 -0700)
Without this change, GCC 4.6 reports:

ofproto/ofproto-dpif-xlate.c: In function ‘xlate_actions’:
ofproto/ofproto-dpif-xlate.c:5117:27: error: missing initializer
ofproto/ofproto-dpif-xlate.c:5117:27: error: (near initialization for
    ‘(anonymous).masks.vlan_tci’)

Reported-by: Joe Stringer <joe@ovn.org>
Reported-at: https://travis-ci.org/openvswitch/ovs/builds/130256491
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Joe Stringer <joe@ovn.org>
ofproto/ofproto-dpif-xlate.c

index 7f4003b..fec8b9c 100644 (file)
@@ -5114,7 +5114,7 @@ xlate_actions(struct xlate_in *xin, struct xlate_out *xout)
         .rule = xin->rule,
         .wc = (xin->wc
                ? xin->wc
-               : &(struct flow_wildcards) { .masks.dl_type = 0 }),
+               : &(struct flow_wildcards) { .masks = { .dl_type = 0 } }),
         .odp_actions = xin->odp_actions ? xin->odp_actions : &scratch_actions,
 
         .indentation = xin->indentation,