From nobody Sun Jul 24 11:01:53 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 4LrKxZ27mTz4XXP7; Sun, 24 Jul 2022 11:01:54 +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 4LrKxZ1Kvsz3bFS; Sun, 24 Jul 2022 11:01:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660514; 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=86CHdX4H2g8b0Bzb0zbHl8G0sciriFbG1jXdmoDasfs=; b=hUjJnt7xd6PViduyjcDiVeIVjMBCWHPHpZVs+njgX2XkwMubbih3rfs5UqOWXRnYAvnMCH CAp8PqdEdCAmVi11RqITZKHiOKzG+OIAlNUv0qzs8ZDltvqtmohhlmUIMwmdaxer2KjUok 50WNybFPHDFLFHM3qrorTxDK5SShfotNGo4opcAxxplWgN8zkHvhOO85/ijbtDk9z44BRc JGX1vyRa3QzglGkai2gskR+AwHLB1h+Yfyt/+B6MOFudcnWy/lWSk+QF9k7C5mT/z/hVZp VrNllPziw1NZSG1f8YQnDWgG5ASgE2et+IfOD96tceMpcFAw9ghST6s5Nz3fwA== 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 4LrKxZ0K6DzGC0; Sun, 24 Jul 2022 11:01:54 +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 26OB1rrA040902; Sun, 24 Jul 2022 11:01:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26OB1rh6040901; Sun, 24 Jul 2022 11:01:53 GMT (envelope-from git) Date: Sun, 24 Jul 2022 11:01:53 GMT Message-Id: <202207241101.26OB1rh6040901@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: 668beb3273cb - stable/13 - Fix unused variable warning in iflib.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/13 X-Git-Reftype: branch X-Git-Commit: 668beb3273cb9462dc5d8af4619efd450c2086a0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660514; 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=86CHdX4H2g8b0Bzb0zbHl8G0sciriFbG1jXdmoDasfs=; b=rJutbHi9LSYtLjndPSY0TSZFg17Tx2OaWkGJJSpJAcbx6M08bjm9Dwq0YOcyg0WzTnm+fK zik26ZxDKwzda8TzJDS4HmpivNBlmJfMvJiqYhZWK3BQ7x6/1QhIEdo5X96OEbV3d6SYuG A5tRibvCjZWZ/w1lE/vifwgYuEqL9oBp4vlrViqOqo6DNkyfdTterASs/5bvokAFg4+kNs gbqWFxwv566jvZrIcHUnjGUK+aCn+6SQr5K0NRhyMFo7DEqI2UO6Nny2D5QXW/hkibdhpx BAeaPSqtdee/rxbEt600df8rZhAsKGUT3XY9wSX1b1OIy+yHI4UTliKVBVAWtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658660514; a=rsa-sha256; cv=none; b=JURrCF14qdgRPZ5pJXOoqLchL8upQHZq+Kd7jfGNkwRugEutaMPtEG/JjJX/+44vZatgBb V1LjWvv2UVD5YX7uQFBJP0OHnIgU7I2Jgz0GzT+bSglxsNXdCOPJGvKwd/GY10DRroAAIx 5Sj2ddBCz3wbGNX3D1PptXZ3nXDuwUkPEuoLgqDWgds28hXYwN8s6VyIzCkErqP7TJAKw3 YLQgJnbHbo6TjR+Oshy6vn3IZPOEqLQGZXxTe7bb0zkp7O3B3lm9ZWVd1Ue3lonYK8Mr/L vj7ZkIv48VLMBst68v4x9YSxZsEmxXjfSkAZaSSfs00gXOUiKIVf/ZEyhTVCsQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=668beb3273cb9462dc5d8af4619efd450c2086a0 commit 668beb3273cb9462dc5d8af4619efd450c2086a0 Author: Dimitry Andric AuthorDate: 2022-07-21 19:19:28 +0000 Commit: Dimitry Andric CommitDate: 2022-07-24 11:00:09 +0000 Fix unused variable warning in iflib.c With clang 15, the following -Werror warning is produced: sys/net/iflib.c:993:8: error: variable 'n' set but not used [-Werror,-Wunused-but-set-variable] u_int n; ^ The 'n' variable appears to have been a debugging aid that has never been used for anything, so remove it. MFC after: 3 days (cherry picked from commit 0294e95da4aa272906d4472137b1235d8d8a7180) --- sys/net/iflib.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 90cc2f851804..eeeadd9c3f48 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -987,7 +987,6 @@ iflib_netmap_txsync(struct netmap_kring *kring, int flags) struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap kring */ u_int nic_i; /* index into the NIC ring */ - u_int n; u_int const lim = kring->nkr_num_slots - 1; u_int const head = kring->rhead; struct if_pkt_info pi; @@ -1040,7 +1039,7 @@ iflib_netmap_txsync(struct netmap_kring *kring, int flags) __builtin_prefetch(&txq->ift_sds.ifsd_m[nic_i]); __builtin_prefetch(&txq->ift_sds.ifsd_map[nic_i]); - for (n = 0; nm_i != head; n++) { + while (nm_i != head) { struct netmap_slot *slot = &ring->slot[nm_i]; u_int len = slot->len; uint64_t paddr;