From nobody Sun Jul 24 11:01:56 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 4LrKxc4bcFz4XXLx; Sun, 24 Jul 2022 11:01:56 +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 4LrKxc30xTz3bCv; Sun, 24 Jul 2022 11:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660516; 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=GXQB0+/UFhCOHRyW8jIdshQJHNBOf9h592VhXYCidfM=; b=fae9BnFurrGhYkcAoXpAnub4hVDbj5vlFeTARGrX4CSJwmWlUuOWggOm1U6FqViemWKmjE BZMxUss4W8tzIScyPChjLCtjOrdkCKhCjwghsuM3OdIWpevHT7ZSNtiLjVIrB438p/BhZ0 xvLqJKHKd8cP+NI3gQnwam/W5pa14u8IFLyMNEnQwrVw3m4cM0Pb4TfT0Igep+Sl5ToEnp wC3DIeXflgezUW9Xue46ZAlpFW9YFLXmaAejhDzxUu5VCNmkj9xX6YXpizh2fzF6FsfwYe QW01bGzaI04wqN2eNLSJdkWba+E9ASX0+ZzpVQIiRRpof27bL04bYriiXe4W8Q== 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 4LrKxc26fhzGm2; Sun, 24 Jul 2022 11:01:56 +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 26OB1uc3040950; Sun, 24 Jul 2022 11:01:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26OB1ugj040949; Sun, 24 Jul 2022 11:01:56 GMT (envelope-from git) Date: Sun, 24 Jul 2022 11:01:56 GMT Message-Id: <202207241101.26OB1ugj040949@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: f931f0d64247 - stable/13 - Fix unused variable warning in if_re_netmap.h 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: f931f0d642476488fad72501969d49460a9a193b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658660516; 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=GXQB0+/UFhCOHRyW8jIdshQJHNBOf9h592VhXYCidfM=; b=pZ2DJN/rrenXeG/rGwZHjeTZJIwfPYq9wEr+GUGeIITW1wDZWWrETAtcHVl7k/d8p2XuE9 vCLaLUJUvJNzTMSRQ/gUKh2X07v/yFe3RsjJ2QvoxxnpPD8WIvzyduuN5mi92DlBayQNYV uLszLSK3NEQUUuyyioOYvbz3IqqkNzr6OD8S/kBk8tMtn1LwtTxeLmQJlDpSFmizeEea2+ H0bR1BhNY/pc+0X9yFIwAmysuBScO4DTiWdK1jM66zTsJg4UrxMshbhkhexYQUomYD+bpu aj3mo+ry1VjcheXDtCwY7Wjwur7lA7sstwfq7BMfvLHfB1gmEmPJndsD4X3+mA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658660516; a=rsa-sha256; cv=none; b=pAQz7mtnUe7vTmdZccEnvXDLmLJgjsmJ2ZjDQq6A27CghK04SuczqkjQ3ikwCelAPw69Jh mmC4/azizEfkbOawqYzqXNeXWQ/mbp9uKJniko0Ha+maL5MfSAKk9w8ict9Z8cGCRmFaI0 A3glXxrdVBAdHHgXgz4MhfmEoFBJOscvWM+B6JfvCC3j/vI9YRLYNlnkFEbHxdAX7x037P TuDqcOH/Jmh2eJRkMneDDj1w2F2mFRiJgMiZIA5q0SmMfTmS1y2MAauH3ablA5xIDF0xGc 6pOJrIgt4Xn+h4MFk54Xb4Gw5AnMYilOdz5uH89owcMeeglbzUfDcqsAxssyXA== 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=f931f0d642476488fad72501969d49460a9a193b commit f931f0d642476488fad72501969d49460a9a193b Author: Dimitry Andric AuthorDate: 2022-07-21 19:52:29 +0000 Commit: Dimitry Andric CommitDate: 2022-07-24 11:00:10 +0000 Fix unused variable warning in if_re_netmap.h With clang 15, the following -Werror warning is produced: sys/dev/netmap/if_re_netmap.h:179: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 8bfedf5852bcb846bfdd2a54989d65cdbb16f7ef) --- sys/dev/netmap/if_re_netmap.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/dev/netmap/if_re_netmap.h b/sys/dev/netmap/if_re_netmap.h index 0e56a731ac6a..7c356ab4bd22 100644 --- a/sys/dev/netmap/if_re_netmap.h +++ b/sys/dev/netmap/if_re_netmap.h @@ -176,7 +176,6 @@ re_netmap_rxsync(struct netmap_kring *kring, int flags) struct netmap_ring *ring = kring->ring; u_int nm_i; /* index into the netmap ring */ 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; int force_update = (flags & NAF_FORCE_READ) || kring->nr_kflags & NKR_PENDINTR; @@ -236,7 +235,7 @@ re_netmap_rxsync(struct netmap_kring *kring, int flags) nm_i = kring->nr_hwcur; if (nm_i != head) { nic_i = netmap_idx_k2n(kring, nm_i); - for (n = 0; nm_i != head; n++) { + while (nm_i != head) { struct netmap_slot *slot = &ring->slot[nm_i]; uint64_t paddr; void *addr = PNMB(na, slot, &paddr);