From e3925cc359ed8e55dca3162d8f38afc20764ec86 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 15 Dec 2016 14:11:20 +0800 Subject: [PATCH] nd6: Fix build error if LWIP_ND6_RDNSS_MAX_DNS_SERVERS == 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix below build error when LWIP_ND6_RDNSS_MAX_DNS_SERVERS == 0 ../../../../lwip/src/core/ipv6/nd6.c: In function ‘nd6_input’: ../../../../lwip/src/core/ipv6/nd6.c:400:10: error: unused variable ‘rdnss_server_idx’ [-Werror=unused-variable] u8_t rdnss_server_idx = 0; ^~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors ../Common.mk:93: recipe for target 'nd6.o' failed make: *** [nd6.o] Error 1 Fixes: 6b1950ec24bc ("nd6: add support for RDNSS option (as per RFC 6106)") Signed-off-by: Axel Lin --- src/core/ipv6/nd6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ipv6/nd6.c b/src/core/ipv6/nd6.c index 689b56e7..00b70f73 100644 --- a/src/core/ipv6/nd6.c +++ b/src/core/ipv6/nd6.c @@ -395,7 +395,7 @@ nd6_input(struct pbuf *p, struct netif *inp) struct ra_header *ra_hdr; u8_t *buffer; /* Used to copy options. */ u16_t offset; -#ifdef LWIP_ND6_RDNSS_MAX_DNS_SERVERS +#if LWIP_ND6_RDNSS_MAX_DNS_SERVERS /* There can by multiple RDNSS options per RA */ u8_t rdnss_server_idx = 0; #endif /* LWIP_ND6_RDNSS_MAX_DNS_SERVERS */