From nobody Sat Jul 23 08:59:08 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 4LqgGN2kkyz4X7Cg; Sat, 23 Jul 2022 08:59:08 +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 4LqgGN1wBkz3hLF; Sat, 23 Jul 2022 08:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658566748; 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=kibvd0kTGku8ShOMJYt1CjyVwodlf5Da3058rWMpnvs=; b=vkqaGtbvcxC5N2oSQkLcBx+kf3SYitqi2Y3+rq1n5DvSLF67LX1zyjSmDBA0s8SuBCzp7T 2vlUb6FVYMi35OvOUd3J/h8WzV2zQhQTTQopHBoi3zQPCCxHYXa0j6Y4LDRVZr2UB1hbqM N+iJvbAyeTMMN17+LBWQ8Yi7GTgnpDFl/V2kltu9cgO7XaTNXpSmGCtI/WVYjYKm5UoAzK DZboUkT7hz0yxVN41HfTYa9oapTbsOUdcNCRhvDGlFWRXdw3Q8WvzJWzWXyqAnUd5IwTzG f0E+u26ophu+rSLODZnbjtQMw/2a3smMPF5zilbc0WwSy2LglYjC30lQVJE+ag== 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 4LqgGN103YzZDZ; Sat, 23 Jul 2022 08:59:08 +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 26N8x8rV013495; Sat, 23 Jul 2022 08:59:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26N8x8nf013494; Sat, 23 Jul 2022 08:59:08 GMT (envelope-from git) Date: Sat, 23 Jul 2022 08:59:08 GMT Message-Id: <202207230859.26N8x8nf013494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 563971cd7a41 - stable/12 - 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 563971cd7a41098cfffdc700896ce849f79101ea Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658566748; 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=kibvd0kTGku8ShOMJYt1CjyVwodlf5Da3058rWMpnvs=; b=Jxrgz5jPZtLTzuXuNfIElg4DxXK6NjzLQqJ3K2zM+gpbV5BO+tvpqU8bhaZPY0hZZgJpV3 schKKxgcvlP94KAUtcsrziN6x8JBtvSZT9CDx85Bmt6LWYA1k2w/FNI+bvnKbGYYgrRyS2 dsvufvTKVt5bbESkJB6DgmNFomS84l0EQJxE7YSyAgytoTZKL8IIeZTZWcO/r4eNJua7JK fliMm8e6cGWjs0Sn/b5e4MvgWYWjFNtI6AEhb9YB/lnamVtHVi3rHfSVaAlB320wAThymI B7BOfv39h7k5nozcdhf6QauZA2MYqUK88YiRKTCI3plNfN/VstEs56+Pv9XpFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658566748; a=rsa-sha256; cv=none; b=FAdst5ia/0xruqECbucHCq8U6x2XYtYIjkmIc0JklouLVOvmck+pQ2+2fpHfoti48d95Ez 46umkVVWTU75G6CY3HyBGPK91wkt9bvKpOEnNJVZkI/YcE1vjwn8mp0zSUek75DkZcfHUN gHnQx4pNo2o5ESLCiK6lOrxX6xMkLfL1usol0YaAdrRuEDS4/MGpSKKIpgpBo8GTe2zhwi YvbtHwwKj14RWTb4wSYRLkyYnmO/YStGcuUGlVGPmt1pIGozrq/Btl2AFqmtqmLO2qatoR w0SR1LKSe3bdcX3rs6ABaGS7Ims6oWmeGWrha1AgM5U+nCt49xnHVVBE+cmEjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=563971cd7a41098cfffdc700896ce849f79101ea commit 563971cd7a41098cfffdc700896ce849f79101ea Author: Dimitry Andric AuthorDate: 2022-07-16 15:06:31 +0000 Commit: Dimitry Andric CommitDate: 2022-07-23 08:57:44 +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 (cherry picked from commit 64741244fc4588eefd954948b77ddf2706448ecd) --- 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 8a01f551fd6c..e063e906bf3d 100644 --- a/sys/dev/alc/if_alc.c +++ b/sys/dev/alc/if_alc.c @@ -3439,7 +3439,6 @@ alc_txeof(struct alc_softc *sc) struct ifnet *ifp; struct alc_txdesc *txd; uint32_t cons, prod; - int prog; ALC_LOCK_ASSERT(sc); @@ -3468,11 +3467,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];