diff options
author | Lance Richardson <lrichard@redhat.com> | 2017-08-28 11:23:16 -0400 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-10-30 16:49:29 -0700 |
commit | af2e40cdb211ee7599edd8925f42af9475606887 (patch) | |
tree | 356f82cdd9f20cd471cfc852fb93097fd0aa229a | |
parent | 33cac6dd4a7067ac64c3dab0bc8bc881124a5eb8 (diff) | |
download | openvswitch-af2e40cdb211ee7599edd8925f42af9475606887.tar.gz |
sparse: eliminate "duplicate initialization" warning
Sparse version 0.5.1 will be released in the near future. Prepare
for it by eliminating the only new warning (as of 0.5.1-rc5):
ofproto/fail-open.c:134:22: error: Initializer entry defined twice
ofproto/fail-open.c:135:22: also defined here
MATCH_CATCHALL_INITIALIZER effectively sets all fields of .flow to
zero, which is redundant because according to the C99 semantics for
structure initialization, initializing any single member of a
structure results in all other members being initialized to zero,
and the next line initializes a member of the same structure.
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Greg Rose <gvrose8192@gmail.com>
-rw-r--r-- | ofproto/fail-open.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/ofproto/fail-open.c b/ofproto/fail-open.c index 914a51b4b..819bdadc3 100644 --- a/ofproto/fail-open.c +++ b/ofproto/fail-open.c @@ -131,7 +131,6 @@ send_bogus_packet_ins(struct fail_open *fo) .base = { .packet = dp_packet_data(&b), .packet_len = dp_packet_size(&b), - .flow_metadata = MATCH_CATCHALL_INITIALIZER, .flow_metadata.flow.in_port.ofp_port = OFPP_LOCAL, .flow_metadata.wc.masks.in_port.ofp_port = u16_to_ofp(UINT16_MAX), |