From nobody Wed Jul 20 17:08:13 2022 X-Original-To: dev-commits-src-all@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 4Lp2G625njz4WSb1; Wed, 20 Jul 2022 17:08:14 +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 4Lp2G61Yjlz441k; Wed, 20 Jul 2022 17:08:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658336894; 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=ldeKq5+kAipGZRTlcPEDDWzVJjNH8rF0kdMNPJqjr54=; b=XqYRSPOdaNWsi8cHPTb9JPmQQUzsm8C0KFWFqnQ65GF0Ygn0ZmXT+0GKgOhz0HSdMNfUnn YU8NM5+DbyWk0ST3I9dGRFeCGfl33KeZCWrlPYjnDUppe7L13zP/50dXK6L6gNIGHSgnEz DPjpIBFo66PHJ07yEDjq2my6ayCxe5GUjveXCXw06xe+Cs2AJ9TFb+PMt25jayb095m/BG bNS5AICRIVXSm53RgrLDmh+TOTgOzUZSgzDZzo0k2Z4EzHEZgRFWAL+VjvXu53B2Z0IK98 Ke2tpAr96JIAeXFsxQK4lT1nqCpFfpcOG2U8KkWIb9I/eoh4hpFgvMksu0vqzQ== 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 4Lp2G60cNpz15ZY; Wed, 20 Jul 2022 17:08:14 +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 26KH8DPf022597; Wed, 20 Jul 2022 17:08:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26KH8D4H022596; Wed, 20 Jul 2022 17:08:13 GMT (envelope-from git) Date: Wed, 20 Jul 2022 17:08:13 GMT Message-Id: <202207201708.26KH8D4H022596@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 64741244fc45 - main - Fix unused variable warning in if_alc.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 64741244fc4588eefd954948b77ddf2706448ecd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658336894; 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=ldeKq5+kAipGZRTlcPEDDWzVJjNH8rF0kdMNPJqjr54=; b=cDeTbrxKHKisGyHhAj5HV2fBeBTlI83bbrscRQgetTk9WNkjagdAupydBEr61KqgqH4Bnk VrIVdNcrfAEFWeyF8w0mBatVHJII2kBwVV5k5yhqFzIkZyckuTR/ksNKyXVYz15wTw102M ousSW8Tku8cTKC9OJXgI+PliLS6XTFNc3UjqlW0Kr1WGOcSdHTIDkmfchBHjaZP+rxA0S3 iGzxgQC1+46klKUq9bYX4i2oDqapwAQmD4B+5T0urwMGUH5ksR/XvGwpYpoSIBCmBbI8HK yQmXqmbE0Z2iGL0asPvrCEgdJ0VzdzwQpl23lW2UQkE8G9Bk5yuou4OPYe5aSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658336894; a=rsa-sha256; cv=none; b=fg3QsyhJi9DKeMVX386TMd4Y7iYwrME8irdExE6iGIoDkl1Iwnc5j/tzPpETx8SYahZnGj EL5vzVv0dSzmWW9GkN4yMH+jHdlkMWB3pf08LOLAHY6mH2gQ01eehoa4ZN9FFLoGP9niiW ncA+0Hj/b9lT0boWRE35axEefc0CaPPqGk3roOc2kwol8z0Uc03XS2EWq/ZTaMedEZw2E7 +SjbuN4BEXE0aTFyE8+v1k5mUFZWcePb4lOL4kLu3QL/LMrabronTIt1syV7ZkHgDvynIS iI+mBWZeNyoh1552kaUGZkT8SHt+vdBVrpFJ1nblR1zrQKYVG9/yW0+yZ0F84w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=64741244fc4588eefd954948b77ddf2706448ecd commit 64741244fc4588eefd954948b77ddf2706448ecd Author: Dimitry Andric AuthorDate: 2022-07-16 15:06:31 +0000 Commit: Dimitry Andric CommitDate: 2022-07-20 17:07:28 +0000 Fix unused variable warning in if_alc.c With clang 15, the following -Werror warning is produced: sys/dev/alc/if_alc.c:3441:6: error: variable 'prog' set but not used [-Werror,-Wunused-but-set-variable] int prog; ^ The 'prog' variable seems to be a left-over from some debugging code that no longer exists, and can be removed without any functional change. MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D35831 --- sys/dev/alc/if_alc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/dev/alc/if_alc.c b/sys/dev/alc/if_alc.c index 128786f2bf0c..dc1df6753811 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -3438,7 +3438,6 @@ alc_txeof(struct alc_softc *sc) struct ifnet *ifp; struct alc_txdesc *txd; uint32_t cons, prod; - int prog; ALC_LOCK_ASSERT(sc); @@ -3467,11 +3466,9 @@ alc_txeof(struct alc_softc *sc) * Go through our Tx list and free mbufs for those * frames which have been transmitted. */ - for (prog = 0; cons != prod; prog++, - ALC_DESC_INC(cons, ALC_TX_RING_CNT)) { + for (; cons != prod; ALC_DESC_INC(cons, ALC_TX_RING_CNT)) { if (sc->alc_cdata.alc_tx_cnt <= 0) break; - prog++; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sc->alc_cdata.alc_tx_cnt--; txd = &sc->alc_cdata.alc_txdesc[cons];