From 920d92580664496deed593f538c881f925a4e7d2 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 17 Jun 2021 13:37:00 +0900 Subject: [PATCH] iperf: Fix an unused function warning seen with clang --- netutils/iperf/iperf.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/netutils/iperf/iperf.c b/netutils/iperf/iperf.c index 6ee511a82..7b48431c1 100644 --- a/netutils/iperf/iperf.c +++ b/netutils/iperf/iperf.c @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include "iperf.h" /**************************************************************************** @@ -673,10 +675,16 @@ static void iperf_task_traffic(void *arg) { iperf_run_tcp_client(); } - else + else if (iperf_is_tcp_server()) { iperf_run_tcp_server(); } + else + { + /* shouldn't happen */ + + assert(false); + } if (s_iperf_ctrl.buffer) {