nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acas...@apache.org
Subject [incubator-nuttx] 01/03: Fix sixlowpan build break with -Werror option under macos
Date Fri, 17 Apr 2020 22:46:10 GMT
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch releases/9.0
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit c269a6e7ad3ba6f1535666089ad5e1194738ed40
Author: liuhaitao <liuhaitao@xiaomi.com>
AuthorDate: Thu Apr 16 20:13:57 2020 +0800

    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>
---
 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 5ec41c1..18fb15e 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)


Mime
View raw message