[3/3] alfred: mismaching declarations of is_valid_ether_addr()

Message ID 20220804185212.3074514-3-mareklindner@neomailbox.ch (mailing list archive)
State Accepted, archived
Delegated to: Simon Wunderlich
Headers
Series [1/3] alfred: add missing alfred_event_notify_v0 struct documentation |

Commit Message

Marek Lindner Aug. 4, 2022, 6:52 p.m. UTC
  util.c:57:34: warning: argument 1 of type ‘uint8_t[6]’
   {aka ‘unsigned char[6]’} with mismatched bound [-Warray-parameter=]
   57 | bool is_valid_ether_addr(uint8_t addr[ETH_ALEN])
      |                          ~~~~~~~~^~~~~~~~~~~~~~
In file included from util.c:20:
alfred.h:231:35: note: previously declared as ‘uint8_t *’
  {aka ‘unsigned char *’}
  231 | bool is_valid_ether_addr(uint8_t *addr);
      |                          ~~~~~~~~~^~~~

Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
---
 alfred.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/alfred.h b/alfred.h
index 6fb57ce..97f0093 100644
--- a/alfred.h
+++ b/alfred.h
@@ -228,7 +228,7 @@  int time_diff(struct timespec *tv1, struct timespec *tv2,
 	      struct timespec *tvdiff);
 void time_random_seed(void);
 uint16_t get_random_id(void);
-bool is_valid_ether_addr(uint8_t *addr);
+bool is_valid_ether_addr(uint8_t addr[ETH_ALEN]);
 bool is_iface_disabled(char *iface);
 int ipv4_arp_request(struct interface *interface, const alfred_addr *addr,
 		     struct ether_addr *mac);