diff mbox series

[ovs-dev,3/3] classifier: Make find_match_wc() prototype and definition match.

Message ID 20210506175410.344793-4-blp@ovn.org
State Accepted
Headers show
Series GCC 11 warning fixes | expand

Commit Message

Ben Pfaff May 6, 2021, 5:54 p.m. UTC
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>
---
 lib/classifier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/lib/classifier.c b/lib/classifier.c
index 2a1d155dad9f..c4790ee6baa9 100644
--- a/lib/classifier.c
+++ b/lib/classifier.c
@@ -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)) {