GCC 11 warned that the prototypes and the definitions of these
functions were different: the prototypes used [], the definitions used
[IFNAMSIZ].  This is perfectly valid from a C standards perspective, but
it's confusing and providing sizes gives the compiler and the developer
a useful hint as to usage.  Therefore, this commit adds the expected
sizes.

Signed-off-by: Ben Pfaff <[email protected]>
---
 lib/tnl-neigh-cache.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/tnl-neigh-cache.h b/lib/tnl-neigh-cache.h
index ded9c2f86fcd..e4b42b059424 100644
--- a/lib/tnl-neigh-cache.h
+++ b/lib/tnl-neigh-cache.h
@@ -32,11 +32,11 @@
 #include "util.h"
 
 int tnl_neigh_snoop(const struct flow *flow, struct flow_wildcards *wc,
-                    const char dev_name[]);
-int tnl_neigh_lookup(const char dev_name[], const struct in6_addr *dst,
+                    const char dev_name[IFNAMSIZ]);
+int tnl_neigh_lookup(const char dev_name[IFNAMSIZ], const struct in6_addr *dst,
                      struct eth_addr *mac);
 void tnl_neigh_cache_init(void);
 void tnl_neigh_cache_run(void);
-void tnl_neigh_flush(const char dev_name[]);
+void tnl_neigh_flush(const char dev_name[IFNAMSIZ]);
 
 #endif
-- 
2.31.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to