From 7afd8c6a21fb14d4d461c4d7d9b182d8277c0bd4 Mon Sep 17 00:00:00 2001 From: liuhaitao Date: Thu, 16 Apr 2020 20:13:57 +0800 Subject: [PATCH] Fix sixlowpan build break with -Werror option under macos sixlowpan/sixlowpan_utils.c:535:20: error: unused function 'sixlowpan_issaddrbased' [-Werror,-Wunused-function] static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr, ^ sixlowpan/sixlowpan_utils.c:543:20: error: unused function 'sixlowpan_iseaddrbased' [-Werror,-Wunused-function] static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr, ^ 2 errors generated. make[1]: *** [sixlowpan_utils.o] Error 1 Signed-off-by: liuhaitao --- net/sixlowpan/sixlowpan_utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/sixlowpan/sixlowpan_utils.c b/net/sixlowpan/sixlowpan_utils.c index 5ec41c1fe0..18fb15e196 100644 --- a/net/sixlowpan/sixlowpan_utils.c +++ b/net/sixlowpan/sixlowpan_utils.c @@ -532,6 +532,7 @@ static inline bool sixlowpan_isbytebased(const net_ipv6addr_t ipaddr, } #endif +#ifdef HAVE_SADDR static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr, FAR const uint8_t *saddr) { @@ -539,7 +540,9 @@ static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr, ipaddr[6] == HTONS(0xfe00) && ipaddr[7] == *(uint16_t *)saddr); } +#endif +#ifdef HAVE_EADDR static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr, FAR const uint8_t *eaddr) { @@ -554,6 +557,7 @@ static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr, ipaddr[6] == *(uint16_t *)(eaddr + 4) && ipaddr[7] == *(uint16_t *)(eaddr + 6)); } +#endif bool sixlowpan_ismacbased(const net_ipv6addr_t ipaddr, FAR const struct netdev_varaddr_s *addr)