Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3140279pxb; Fri, 5 Nov 2021 10:23:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7ll7FJ2gmuKDs0uuUo7hM9bofS8uF8IukIYMXlS6NbSNerKrdSMRhd75B8HaySQjDoQbT X-Received: by 2002:a05:6638:408d:: with SMTP id m13mr7747297jam.41.1636133004137; Fri, 05 Nov 2021 10:23:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636133004; cv=none; d=google.com; s=arc-20160816; b=nowBMxJlRCtbqp2p70of975phoZFqI3aGkLeOoUUmfAVxw6AjHaD20rOVJe/XJZnNQ JxXiKIcZHOgu2XsVZNdlsxLouaWIP/gaLOmXbm2wDl7SPRwYHar0RkO+uVgAc6IL6LNi teIS5nHpK9jYCKwMdeaqTwdfXjoZqSPEJA2KMU3+3w6NAfimSW9DYSmJypr0crMn4kFy 0bBytlksYJP+vTmDvzO56DQuBfTap232QtpdHiOpUV3jWl7Iylmjp6ulDSO5jet6eBdY j5e3XGutPkngq0Vdi3bZ8p/KuuW5qb2YnXYK89Qs8uhKCM+NAIYovTePN4v6wVAzdh9O pZ4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vgo3jVJmdTH5GxUz+5stwlmrOeYD79EfO01ThQfyjbQ=; b=QD1GaSMCbAwXSj7b+D5zx+4INk9BV+Uw42+Ao2Yfj7JdoUN8rcSK1Mp22JV0UmpXk+ kdp9BhgrRB1PjT7vU2Xl/IQtL/iF5WpcxUDNJz4BojJ7MiRyJHUjyrIIWepPHGE+cy70 dp4xixQUbB6QjzsQ+qUopb76Lq6dNseBge5o9+Dun+MW9gDP1d0vNckKlDFt/ojSSBc+ WD0TXweLoqtzp2caQOCmrRSy980W7FQomrIgriZ+nQR6wOet48I9bzG0rQ9E8Sk9t4Bx dKChHlMMOj17taDPxamCyy3jFDzGFOkr7lBpWc5JtPf1NcHsL40u1lJQY/BVF7TCZfhR zbOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Np1j9Uy0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k20si18459766iow.102.2021.11.05.10.23.12; Fri, 05 Nov 2021 10:23:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Np1j9Uy0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233933AbhKEQsF (ORCPT + 99 others); Fri, 5 Nov 2021 12:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233951AbhKEQsB (ORCPT ); Fri, 5 Nov 2021 12:48:01 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 898ABC061208 for ; Fri, 5 Nov 2021 09:45:21 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id f3so19809467lfu.12 for ; Fri, 05 Nov 2021 09:45:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vgo3jVJmdTH5GxUz+5stwlmrOeYD79EfO01ThQfyjbQ=; b=Np1j9Uy0lGaSSTvDEzHqS2+yEZcf0ojz8egqSf66QCCCqHsOnZAexmX7yu+3L6iDXu 060T/Ak0MJgayTUGaF5KsLjXVPir4Dn8b61gY+eHuQNJqnLLD6vQtJwQdMStoMJY/Ycm fSdP6w/3sUbhj7AlCG6dvw+ZFKYAm6pbzsZpYr/7PgAxWgdf+pqch6Hra/LBNRMDvVNo qkKTEltpflbo23In6QS2b53SJoqmpyS+TZryh3EY+vKvi8XKixQdcAOuh2PhtbDDPqfA qIc6+RevvSkXnHJREbGBcjxuCGGzQ6oFyPLhC2ut5mSw60mTYq4bLv8IJtZodz8BexgZ MZgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vgo3jVJmdTH5GxUz+5stwlmrOeYD79EfO01ThQfyjbQ=; b=g8iSvIffB1oZkPfb1bQ+/NFq2DuS6AVJLZ/2IQvSpeQ9DdxyMUF//UgqWRy2pa2LZ2 cHwU+zGB5Tg8D53tM9WUmxpYAj2Ha3zEXh4yvav+z1ubNV4IMB8nP7Y+lhWuhMJGnltc SqM8b2SQQrLrX+BOC7t0bB5jCujAaWak1/drp274+JLTxtqIYn3qBTDzawnoEf8PkeBl MZ3UV2QzW8tZfWujgH0czTgN0FJFGfVN9/mejKqFSAGtFKhbzwOB019z0N9QeLsUknCJ xa7F8HEUwgbc2UrSdbqQBV69fBGmV0CGmpwT3ihsE3+vHJDmcxpwDnfC52uSgRNKdtdy YOig== X-Gm-Message-State: AOAM531figY8MiIFgfIAuzkZplyXUiXpxfEZvUO/9uH2BqxIr+KD/s+n lmo6tXUYWVS+NOvXNiMV966vxA== X-Received: by 2002:ac2:4c53:: with SMTP id o19mr55052413lfk.303.1636130719932; Fri, 05 Nov 2021 09:45:19 -0700 (PDT) Received: from localhost (c-9b28e555.07-21-73746f28.bbcust.telenor.se. [85.229.40.155]) by smtp.gmail.com with ESMTPSA id l15sm725734lfg.239.2021.11.05.09.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Nov 2021 09:45:19 -0700 (PDT) From: Anders Roxell To: davem@davemloft.net, kuba@kernel.org, shuah@kernel.org Cc: nathan@kernel.org, ndesaulniers@google.com, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Anders Roxell Subject: [PATCH] selftests: net: tls: remove unused variable and code Date: Fri, 5 Nov 2021 17:45:11 +0100 Message-Id: <20211105164511.3360473-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building selftests/net with clang, the compiler warn about the function abs() see below: tls.c:657:15: warning: variable 'len_compared' set but not used [-Wunused-but-set-variable] unsigned int len_compared = 0; ^ Rework to remove the unused variable and the for-loop where the variable 'len_compared' was assinged. Signed-off-by: Anders Roxell --- tools/testing/selftests/net/tls.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/testing/selftests/net/tls.c b/tools/testing/selftests/net/tls.c index d3047e251fe9..e61fc4c32ba2 100644 --- a/tools/testing/selftests/net/tls.c +++ b/tools/testing/selftests/net/tls.c @@ -654,7 +654,6 @@ TEST_F(tls, recvmsg_single_max) TEST_F(tls, recvmsg_multiple) { unsigned int msg_iovlen = 1024; - unsigned int len_compared = 0; struct iovec vec[1024]; char *iov_base[1024]; unsigned int iov_len = 16; @@ -675,8 +674,6 @@ TEST_F(tls, recvmsg_multiple) hdr.msg_iovlen = msg_iovlen; hdr.msg_iov = vec; EXPECT_NE(recvmsg(self->cfd, &hdr, 0), -1); - for (i = 0; i < msg_iovlen; i++) - len_compared += iov_len; for (i = 0; i < msg_iovlen; i++) free(iov_base[i]); -- 2.33.0