From nobody Thu Jul 21 19:53:30 2022 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 4LpjtL6cvJz4XPMJ; Thu, 21 Jul 2022 19:53:30 +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 4LpjtL69n2z3bGQ; Thu, 21 Jul 2022 19:53:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658433210; 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=TxM69zCFghXwJiIfwsE3bGVsNTqt3vZGyBfKp5NNlsM=; b=e/DH1Rot1X5VY3VR+PMFkBT2+JPFlzVATBe/oG7SLO9grmGGPgiOEMRnZSK1AwbwZ3huFY jG7duWwxszxgBg97BY4q72pnAprcZBNjaT2k8uw3vtUhDQlFHu/0JvGVP7RdV0S5ie/f+r Dpv0Xepl4nEQBWmocOZuTnbBT/MIItaFhqhg7q21M2Ac1x188nm9gj+jygn6NLiSwMsSKo onFJGtrBtuaxxZVlIfP1DV2IknAi2F+Zw66uRppIjaA/uJGhTNDR/fSZYAjsdpHF+D2F5V 9wFu8ZJQ2v9j14om73HQ3o/HhDIM+LvuhWS53rtnrrbOpLXq/JJAltYxsRNegQ== 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 4LpjtL5FlfzZbH; Thu, 21 Jul 2022 19:53:30 +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 26LJrUCV006263; Thu, 21 Jul 2022 19:53:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26LJrUgt006262; Thu, 21 Jul 2022 19:53:30 GMT (envelope-from git) Date: Thu, 21 Jul 2022 19:53:30 GMT Message-Id: <202207211953.26LJrUgt006262@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: 0294e95da4aa - main - Fix unused variable warning in iflib.c 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0294e95da4aa272906d4472137b1235d8d8a7180 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658433210; 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=TxM69zCFghXwJiIfwsE3bGVsNTqt3vZGyBfKp5NNlsM=; b=b7+2AoT5GajJq+MPmeSmfXjFx95PtqKTAFu4gF1kvhY0j7PfHBLKolRzfRxAB6+6avaE7m YMCYMzgIARmaX0ZIB8sKgnSgiN3fKJ8/83hpKAvmu+p0HYz6Iwohusp3R3reDW2rXr/prK h48QsvzKXEALaHtgGqJhtbOJcIilgweBLrSzOglzkCJoJAknAixz/Duksjq3s/LjvjSaqM ksVwW7KDbwB+J/f17fAtLkYc6ftdqME3xbpdT92c+I8u2ngDmH9aQJipqjLy3OLJq25gDd iwyns5P/2s+5tGnXY/hIn31ghF+cumNCrV3OU2v3ek92i7KVJkeR6iHKfwH1Xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658433210; a=rsa-sha256; cv=none; b=O0iEU2KcddLhlnuTQqrQH19lGRIURv4t7MSpJgnZoc0FoG3kV+sMovZXQMclXV+d7qdW/d Acyjdp7g4VLxGHL4a7zKRoIXjR53NoRP/66/+lrNPUqTXPmlAoohIiLR6SdODVmVkp6Eqg jcoyCJfLdvz4AAaXMYBW/69HIGxySZk2GjoYDoany6o+hnRzdT8yPmSW57+7DfIsBwum7o tqTZItbpPmsLq0yngOG7d46sDsplX/dWVo/cmzs3Ob0t7C+7KHplk25x6o3AXBpOvBTNZl KbzzRlavfDZsh8oDrOMl/0vc8oc4VKtKi0+6X+NO0WVWS/bMLITGvZX4A7z02w== 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=0294e95da4aa272906d4472137b1235d8d8a7180 commit 0294e95da4aa272906d4472137b1235d8d8a7180 Author: Dimitry Andric AuthorDate: 2022-07-21 19:19:28 +0000 Commit: Dimitry Andric CommitDate: 2022-07-21 19:19:39 +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 --- 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 d088571b09c0..b7a96eb3dde5 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -990,7 +990,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; @@ -1043,7 +1042,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]; uint64_t offset = nm_get_offset(kring, slot); u_int len = slot->len;