From 52339cdf5af92edec1887f8ed5684c15bac76c73 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Thu, 20 Apr 2017 12:16:53 +0300 Subject: [PATCH] net: tcp: Avoid unused variable compiler warning If TCP debugging is enabled but if the loglevel is set to lower than 4, then compiler prints warning about unused flags variable in net_tcp_trace(). Change-Id: I2e663644b50fe97b75088202e21b286aa010953e Signed-off-by: Jukka Rissanen --- subsys/net/ip/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/net/ip/tcp.c b/subsys/net/ip/tcp.c index c288c72e55a..4df6ef5fcaf 100644 --- a/subsys/net/ip/tcp.c +++ b/subsys/net/ip/tcp.c @@ -62,7 +62,7 @@ struct tcp_segment { const struct sockaddr *dst_addr; }; -#if defined(CONFIG_NET_DEBUG_TCP) +#if defined(CONFIG_NET_DEBUG_TCP) && (CONFIG_SYS_LOG_NET_BUF_LEVEL > 2) static char upper_if_set(char chr, bool set) { if (set) {