Skip to content

Commit

Permalink
classifier: Make find_match_wc() prototype and definition match.
Browse files Browse the repository at this point in the history
The prototype said *, the definition said [CLS_MAX_TRIES].  GCC 11
complains about this (though it is perfectly valid from a C standards
perspective).  It would probably be better to make them both use
[CLS_MAX_TRIES] but that's only allowed if the struct's definition is
visible at the point of the prototype, which it's not.  Instead of
moving the definition, this commit just changes both usages to *.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Paolo Valerio <pvalerio@redhat.com>
  • Loading branch information
blp committed May 7, 2021
1 parent b96d275 commit 721488d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/classifier.c
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,7 @@ find_match(const struct cls_subtable *subtable, ovs_version_t version,

static const struct cls_match *
find_match_wc(const struct cls_subtable *subtable, ovs_version_t version,
const struct flow *flow, struct trie_ctx trie_ctx[CLS_MAX_TRIES],
const struct flow *flow, struct trie_ctx *trie_ctx,
unsigned int n_tries, struct flow_wildcards *wc)
{
if (OVS_UNLIKELY(!wc)) {
Expand Down

0 comments on commit 721488d

Please sign in to comment.