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 <liuhaitao@xiaomi.com>
This commit is contained in:
liuhaitao 2020-04-16 20:13:57 +08:00 committed by Xiang Xiao
parent b33c339c8a
commit 7afd8c6a21

View File

@ -532,6 +532,7 @@ static inline bool sixlowpan_isbytebased(const net_ipv6addr_t ipaddr,
} }
#endif #endif
#ifdef HAVE_SADDR
static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr, static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr,
FAR const uint8_t *saddr) FAR const uint8_t *saddr)
{ {
@ -539,7 +540,9 @@ static inline bool sixlowpan_issaddrbased(const net_ipv6addr_t ipaddr,
ipaddr[6] == HTONS(0xfe00) && ipaddr[6] == HTONS(0xfe00) &&
ipaddr[7] == *(uint16_t *)saddr); ipaddr[7] == *(uint16_t *)saddr);
} }
#endif
#ifdef HAVE_EADDR
static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr, static inline bool sixlowpan_iseaddrbased(const net_ipv6addr_t ipaddr,
FAR const uint8_t *eaddr) 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[6] == *(uint16_t *)(eaddr + 4) &&
ipaddr[7] == *(uint16_t *)(eaddr + 6)); ipaddr[7] == *(uint16_t *)(eaddr + 6));
} }
#endif
bool sixlowpan_ismacbased(const net_ipv6addr_t ipaddr, bool sixlowpan_ismacbased(const net_ipv6addr_t ipaddr,
FAR const struct netdev_varaddr_s *addr) FAR const struct netdev_varaddr_s *addr)