From nobody Sun Jul 24 11:02:29 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 4LrKyG2dDpz4XXQC; Sun, 24 Jul 2022 11:02: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 4LrKyG0PMpz3dj7; Sun, 24 Jul 2022 11:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660550; 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=aLhCKeUb61W9XUH5RlN0O7pkSczHRlzJGKuXRap5dXI=; b=eq8CbTRu5emKXYRU+myVlJJKxhySTNFMNZSYdXyagVnpjtxFVgg9D7DvB03zQH9nSI9o6I T8GppDalWeURBWG+5TQuk+/cW+fXoxPgtiBbaBIUWD9RtwlceIcdMFik8mj0pySHl6oWPg Y0fMYB4Ty4lj2DP0RfpT9qMrJAfCR9v3NtaeUxTXYZTlCt099DDX3mEWPO4xiB3+akyw8P HslBAgQ52zWpXFnXjavh0qoxJXyu8AaClWMEhjoTv+ZGrYL+L16y8qlb+wYBpn7k+IH6U0 ScCvRDnndgLquSePtEmagk2XyJl4YmO+iSyi6EGnsZswl0Jed+PX+JpV6i1jGQ== 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 4LrKyF6KK9zGr0; Sun, 24 Jul 2022 11:02:29 +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 26OB2Ttf041616; Sun, 24 Jul 2022 11:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26OB2TC8041615; Sun, 24 Jul 2022 11:02:29 GMT (envelope-from git) Date: Sun, 24 Jul 2022 11:02:29 GMT Message-Id: <202207241102.26OB2TC8041615@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: 0f99030d3547 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 0f99030d35478242a57bc9fdae6bfc732a69dc81 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660550; 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=aLhCKeUb61W9XUH5RlN0O7pkSczHRlzJGKuXRap5dXI=; b=ZOEBZCcLGKVol2j1ku0Rxgz8gUvFZs78nt/szCF2SaxWJUuCalJ2JzFrVaN1NfyyO5TNWz cASVwBOfdkRNb0lPMDq9UoGMzIVmE5cOncBONCK2QVJMycJJgyk52noJPj6dCWcfuRzyAN FiGriqdO+tHNMoxUw5mDbzJbbZOBhIMZ/KDBTLQMb16jzij3QcAuVDJ5WtZaZI+YP9fcB2 SRZHi/kRVeYgMf8/16yY/iPtwvLq92iYPK0HmuZlKQHFkHRIAGt2PyHPZSmo17tzBsBXko POR9JLbr0PBr2auaTlyIGgA2Fh+h9ZH03drln/WyF9xRPWCGVxvb24fzI93vlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658660550; a=rsa-sha256; cv=none; b=VtFo4GQ+B//Z4zrEH0muLjVfiqAobI8Yb2TWi6guq7jMvACGbBSe1m4BzYZ2C++WYe6b6H QB460w7XW6JF4fCKfIzsFprk+25Rrdkv/UhZN8npwFKHpI8EyTxH0IQ0llnIUHVdmZLh3m JlNYmHQaVRIxSutiKwxToPaOK/nhvO5e3ENgCFxVceAe8dkSI8fvc4aa6pmOQDQlJJFesv AZMQwAGAa9/DOxLcy7o1nCdz6EYD24NV6mKIo6FWDpTdtL4sWlJx86UIG5HvS5axzM51Ai 2EeLmpuyAOux9wiGxlA6lgJ4aeK3cyDfyeB7aIfrCa28lIkiw4WKr0bbyHjboQ== 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=0f99030d35478242a57bc9fdae6bfc732a69dc81 commit 0f99030d35478242a57bc9fdae6bfc732a69dc81 Author: Dimitry Andric AuthorDate: 2022-07-21 19:19:28 +0000 Commit: Dimitry Andric CommitDate: 2022-07-24 11:01:21 +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 f057b7deba91..170e502481c8 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -996,7 +996,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; @@ -1049,7 +1048,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;