From nobody Tue Jun 27 17:19:45 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QrBKZ01rGz4f4Lw; Tue, 27 Jun 2023 17:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QrBKY5xX1z3NPM; Tue, 27 Jun 2023 17:19:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kw+r3yDgxUxG3qatxdcsSeoyJ3Gf6RQebB5eQM/N1Hg=; b=oPyXlP6vb2Inpf1cLTuJVkMliAsKMIbo5Qm+t7YGFv+9GwbmWkOQhEryZ/r3elIaI0Cq67 mY+34Ud5yfN4GOWELR3xZUhWknB+OPYavx6dBco1Ret9MIBVwnlOWg5Dyi80DQxpOQa6YG sg9lgrLZw02FdTCs7NQZEvyymH9QQdfb10Ou9BRd7pxYcTyr+LWdeVx4r2nYW9DgdLkiuu yxIjrGmU4ZQOArFBq3UXRLQVQc4RmJMkEEyJzUZpmt9pNU6WyyOJMHJki+WTEeP+4KAood lz5NZ5Tl1OKYBafyoMQ/4u1vpRtmXdCPwt6eh7eDQv51MrgL6FY6f9TIRTiF4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687886385; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kw+r3yDgxUxG3qatxdcsSeoyJ3Gf6RQebB5eQM/N1Hg=; b=w29VLztZMaM0fqNgbnoIHWvVdD9lZ1Tg+ZDv34H9XfNEFRqdX8yFrn6UKEMCqVr749VEYI qRrtV//mYYwn7yhg4gYX+ui9kt9G2j7n1uTSFaBgPAbp1mPmMq1B7+a2//ayfRh2wUjazs YS1qfkhFII5TMLTYm/83txzErPrfcvzqUJcii+7oLNjeXjXKCL7Jrf0K64Gnk25lTiG9J5 cRzYez5e21OA1Pj/QMBofCgeUsT0bv285WCqsrNpwVGnWnFUDNi1Ig82p5vaMCbNzrGKwZ RlcSb71PWcxaVYd2fsqk7vc8tWFRjcE/0A74V7Tuer25cuMU0b81Yv13QAX8qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687886385; a=rsa-sha256; cv=none; b=cISLK2wpGSUs7jsWba6xYwa+vaYu8qMSnaaygSosts6G5CmteXm1XaaSH3n55ZErS9lYBT TA6G3N535ld/Tp+XMfqCawz9KhknU5F/uQKt590mJEaQNhP3tgfB8BAE2YVSetx52u0DyZ jE26te8XAxFGLL6ubW7tccJevlC5cDHOdB8xcadHyLn53x4UBAD/DSETqly5GG3lg6OkFp 6UNxIHDYpAcbpjv6SabVqj2dGg/Fyk7FQ/groTBqRKTifc5h5aiJr2R+7Iki5PZGo1mlFB seOTKWp7At9BHqp/9eRPEFVcSnZx6lIUUS8RYhcYXFR2zxr9Ad//Krfma7OC4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QrBKY51gNz10r7; Tue, 27 Jun 2023 17:19:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35RHJjtu006924; Tue, 27 Jun 2023 17:19:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35RHJjeS006923; Tue, 27 Jun 2023 17:19:45 GMT (envelope-from git) Date: Tue, 27 Jun 2023 17:19:45 GMT Message-Id: <202306271719.35RHJjeS006923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 90f2fee0e040 - main - ipf: Remove set but unused variables. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90f2fee0e0400a785db8e5eadad40801d77b74b8 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=90f2fee0e0400a785db8e5eadad40801d77b74b8 commit 90f2fee0e0400a785db8e5eadad40801d77b74b8 Author: John Baldwin AuthorDate: 2023-06-27 17:19:32 +0000 Commit: John Baldwin CommitDate: 2023-06-27 17:19:32 +0000 ipf: Remove set but unused variables. Reported by: clang Differential Revision: https://reviews.freebsd.org/D40667 --- sbin/ipf/ipmon/ipmon.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sbin/ipf/ipmon/ipmon.c b/sbin/ipf/ipmon/ipmon.c index 4f07dda27e62..3aa6d4d05043 100644 --- a/sbin/ipf/ipmon/ipmon.c +++ b/sbin/ipf/ipmon/ipmon.c @@ -304,7 +304,6 @@ static icmp_subtype_t * find_icmpsubtype(int type, icmp_subtype_t *table, size_t tablesz) { icmp_subtype_t *ist; - int i; if (tablesz < 2) return (NULL); @@ -312,11 +311,10 @@ find_icmpsubtype(int type, icmp_subtype_t *table, size_t tablesz) if ((type < 0) || (type > table[tablesz - 2].ist_val)) return (NULL); - i = type; if (table[type].ist_val == type) return (table + type); - for (i = 0, ist = table; ist->ist_val != -2; i++, ist++) + for (ist = table; ist->ist_val != -2; ist++) if (ist->ist_val == type) return (ist); return (NULL); @@ -327,7 +325,6 @@ static icmp_type_t * find_icmptype(int type, icmp_type_t *table, size_t tablesz) { icmp_type_t *it; - int i; if (tablesz < 2) return (NULL); @@ -335,11 +332,10 @@ find_icmptype(int type, icmp_type_t *table, size_t tablesz) if ((type < 0) || (type > table[tablesz - 2].it_val)) return (NULL); - i = type; if (table[type].it_val == type) return (table + type); - for (i = 0, it = table; it->it_val != -2; i++, it++) + for (it = table; it->it_val != -2; it++) if (it->it_val == type) return (it); return (NULL);