diff mbox series

[ovs-dev,2/3] tnl-neigh-cache: Include expected array sizes in prototypes.

Message ID 20210506175410.344793-3-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
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 <blp@ovn.org>
---
 lib/tnl-neigh-cache.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

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