Skip to content

Commit

Permalink
ofctrl: Placate GCC.
Browse files Browse the repository at this point in the history
Some GCC versions don't like ".x.y =", complaining about an uninitialized
field.

Without this patch we get travis failures, e.g.
https://travis-ci.org/openvswitch/ovs/jobs/410404752:

    ovn/controller/ofctrl.c: In function ‘ofctrl_put’:
    ovn/controller/ofctrl.c:1086:9: error: missing initializer for field ‘flags’ of ‘struct ofputil_meter_config’ [-Werror=missing-field-initializers]
             };
             ^
    In file included from ovn/controller/ofctrl.c:35:0:
    ./include/openvswitch/ofp-meter.h:53:14: note: ‘flags’ declared here
         uint16_t flags;
                  ^

With it, it passes.

Fixes: 185b13f ("ovn: Add Meter and Meter_Band tables to the NB and SB databases.")
Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Justin Pettit <[email protected]>
  • Loading branch information
blp committed Jul 31, 2018
1 parent 977433d commit 1a7f796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ovn/controller/ofctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ ofctrl_put(struct hmap *flow_table, struct shash *pending_ct_zones,
/* Delete the meter. */
struct ofputil_meter_mod mm = {
.command = OFPMC13_DELETE,
.meter.meter_id = m_installed->table_id,
.meter = { .meter_id = m_installed->table_id },
};
add_meter_mod(&mm, &msgs);

Expand Down

0 comments on commit 1a7f796

Please sign in to comment.