Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2315405rdg; Sun, 15 Oct 2023 23:32:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNp0rr0cITrzMmcSxsB5AqflAFzpnoqYNEWo2lVneol9zSxNV2neD0StJpBAj/s/9y8PIP X-Received: by 2002:a17:902:ef8d:b0:1c9:d968:5639 with SMTP id iz13-20020a170902ef8d00b001c9d9685639mr12778383plb.48.1697437957176; Sun, 15 Oct 2023 23:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697437957; cv=none; d=google.com; s=arc-20160816; b=STLIx4UIbuqDIzxIzhim+5+G79Ex66jK8tltWk28u+Bl642uCVn8C3QvdT2iplLweA GzeyMZMSADtXDMdTL9xADTgB+9H7ApHp+2ioWv595NBN6m3RE/wl0t4p5EeXOlMThPWm mIzqYvUMNUMqy1j7jGVhG1jZQMhWjcCJQbpveuASp+5WLp8N+FYWfYFeaSWbDHcvSRbM QmqAWp2cE9/L+2htozULLUwbYOnp9YCarTckLUMV74uXjaVIURxbJ/FcMFZ/w/tuhJgV FZyxdue4bA/nVA+EWLWU+eUG4lnX9+n3rJ9OlYDlMIFew0NP1dmMGyKR198UAYtTbgY4 R1Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=GUcWcIHofu3s0rB5IDEqUlanaFotFRWzaWU6HQgaWto=; fh=LUAoaJOLprYyvjVRAe9tBhgt9bXt4DsNNoYGzBD5MBo=; b=vcmGKl6aDCXE70ASyTTI1b6E1cKrM8+lH+tB4aC9sXOk5s5YcZ0AggQUW+bb/yphK+ Q0AsMohlIYjqm+RAF9+uPtEogeRRkUrd1gRmS/gqvuPP+8MqPTIt3ylXsFYrxQ1p1xX3 fTc+JRfBibcxP9sgekBcg7BOOsfDnuveT/781LEkKvNxjMMbqaEmUPLuv6vb+lAbtn9F 0AbCAcIRnQPHzUHh0LwG+Kcu0762rLdTtWxnXYafiMnK5J0fgUFTZrKRpyjYJPjo61ah fIpfWVSBPYVU7M68gA7PMvo3h6nZshVv6FNdPGNa9BSfdgVhmwAjZAeYQ3wXL8F8MOlJ s3+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id y3-20020a170902ed4300b001c9e29d5d8asi5292562plb.112.2023.10.15.23.32.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Oct 2023 23:32:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E6D1480926BE; Sun, 15 Oct 2023 23:32:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231805AbjJPGc0 (ORCPT + 99 others); Mon, 16 Oct 2023 02:32:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232243AbjJPGcY (ORCPT ); Mon, 16 Oct 2023 02:32:24 -0400 Received: from cmccmta2.chinamobile.com (cmccmta2.chinamobile.com [111.22.67.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 161ACDC; Sun, 15 Oct 2023 23:30:46 -0700 (PDT) X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from spf.mail.chinamobile.com (unknown[10.188.0.87]) by rmmx-syy-dmz-app07-12007 (RichMail) with SMTP id 2ee7652cd892b73-ff3af; Mon, 16 Oct 2023 14:30:42 +0800 (CST) X-RM-TRANSID: 2ee7652cd892b73-ff3af X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from ubuntu.localdomain (unknown[10.54.5.252]) by rmsmtp-syy-appsvr08-12008 (RichMail) with SMTP id 2ee8652cd890ddd-29fd1; Mon, 16 Oct 2023 14:30:41 +0800 (CST) X-RM-TRANSID: 2ee8652cd890ddd-29fd1 From: zhujun2 To: davem@davemloft.net Cc: edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, zhujun2@cmss.chinamobile.com Subject: [PATCH] selftests: net: remove unused variables Date: Sun, 15 Oct 2023 23:30:39 -0700 Message-Id: <20231016063039.3771-1-zhujun2@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sun, 15 Oct 2023 23:32:35 -0700 (PDT) These variables are never referenced in the code, just remove them Signed-off-by: zhujun2 --- tools/testing/selftests/net/af_unix/scm_pidfd.c | 1 - tools/testing/selftests/net/af_unix/test_unix_oob.c | 2 -- tools/testing/selftests/net/nettest.c | 5 +++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/af_unix/scm_pidfd.c b/tools/testing/selftests/net/af_unix/scm_pidfd.c index a86222143..7e5345941 100644 --- a/tools/testing/selftests/net/af_unix/scm_pidfd.c +++ b/tools/testing/selftests/net/af_unix/scm_pidfd.c @@ -294,7 +294,6 @@ static void fill_sockaddr(struct sock_addr *addr, bool abstract) static void client(FIXTURE_DATA(scm_pidfd) *self, const FIXTURE_VARIANT(scm_pidfd) *variant) { - int err; int cfd; socklen_t len; struct ucred peer_cred; diff --git a/tools/testing/selftests/net/af_unix/test_unix_oob.c b/tools/testing/selftests/net/af_unix/test_unix_oob.c index 532459a15..a7c51889a 100644 --- a/tools/testing/selftests/net/af_unix/test_unix_oob.c +++ b/tools/testing/selftests/net/af_unix/test_unix_oob.c @@ -180,9 +180,7 @@ main(int argc, char **argv) char buf[1024]; int on = 0; char oob; - int flags; int atmark; - char *tmp_file; lfd = socket(AF_UNIX, SOCK_STREAM, 0); memset(&consumer_addr, 0, sizeof(consumer_addr)); diff --git a/tools/testing/selftests/net/nettest.c b/tools/testing/selftests/net/nettest.c index 39a0e01f8..cd8a58097 100644 --- a/tools/testing/selftests/net/nettest.c +++ b/tools/testing/selftests/net/nettest.c @@ -1864,8 +1864,9 @@ static char *random_msg(int len) n += i; len -= i; } - i = snprintf(m + n, olen - n, "%.*s", len, - "abcdefghijklmnopqrstuvwxyz"); + + snprintf(m + n, olen - n, "%.*s", len, + "abcdefghijklmnopqrstuvwxyz"); return m; } -- 2.17.1