From bc0fafdecae1696bcf260bddf1ac1aa6aeda3176 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 2 May 2017 21:50:25 +0800 Subject: [PATCH] udp: Fix compiling for IPv6-only build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix below build error when LWIP_IPV6 && !LWIP_IPV4: cc -g -Wall -DLWIP_DEBUG -pedantic -Werror -Wparentheses -Wsequence-point -Wswitch-default -Wextra -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wc++-compat -Wwrite-strings -Wold-style-definition -Wcast-align -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Wno-address -Wunreachable-code -Wuninitialized -Wlogical-op -I. -I../../.. -I../../../../lwip/src/include -I../../../ports/unix/port/include -I../../../../mbedtls/include -Wno-redundant-decls -DLWIP_HAVE_MBEDTLS=1 -c ../../../../lwip/src/core/udp.c ../../../../lwip/src/core/udp.c: In function ‘udp_input_local_match’: ../../../../lwip/src/core/udp.c:130:58: error: unused parameter ‘inp’ [-Werror=unused-parameter] udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast) ^~~ Fixes: 13ffc86aeff3 ("Start working task #14494: Implement SO_BINDTODEVICE") Signed-off-by: Axel Lin Signed-off-by: Dirk Ziegelmeier --- src/core/udp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/udp.c b/src/core/udp.c index f7b305dd..949d6e7d 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -129,6 +129,7 @@ again: static u8_t udp_input_local_match(struct udp_pcb *pcb, struct netif *inp, u8_t broadcast) { + LWIP_UNUSED_ARG(inp); /* in IPv6 only case */ LWIP_UNUSED_ARG(broadcast); /* in IPv6 only case */ /* check if PCB is bound to specific netif */