From e8cbf2e5fb40dc894416b8028525f6a3ee8e8b10 Mon Sep 17 00:00:00 2001 From: Arthur Fabre Date: Thu, 16 Jul 2015 10:20:36 +0100 Subject: [PATCH] Fix warning in TCPIP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When disabling TCP support, the following warning is triggered: ../..//core/net/ip/tcpip.c:159:1: warning: ‘start_periodic_tcp_timer’ defined but not used [-Wunused-function] An added ifdef guard now only defines this function when TCP support is enabled. --- core/net/ip/tcpip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/net/ip/tcpip.c b/core/net/ip/tcpip.c index 1c75d1bc9..839330ab7 100644 --- a/core/net/ip/tcpip.c +++ b/core/net/ip/tcpip.c @@ -155,6 +155,7 @@ unsigned char tcpip_is_forwarding; /* Forwarding right now? */ PROCESS(tcpip_process, "TCP/IP stack"); /*---------------------------------------------------------------------------*/ +#if UIP_TCP || UIP_CONF_IP_FORWARD static void start_periodic_tcp_timer(void) { @@ -162,6 +163,7 @@ start_periodic_tcp_timer(void) etimer_restart(&periodic); } } +#endif /* UIP_TCP || UIP_CONF_IP_FORWARD */ /*---------------------------------------------------------------------------*/ static void check_for_tcp_syn(void)