From nobody Sun Aug 21 11:29:14 2022 X-Original-To: dev-commits-src-branches@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 4M9YDC1zJhz4ZYhp; Sun, 21 Aug 2022 11:29:15 +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 4M9YDC1NFsz3xh8; Sun, 21 Aug 2022 11:29:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661081355; 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=hAlykwExeAZvyd2Pm5iH7s1tqPGYKar8F6QPAt8Vxos=; b=oHi/rDBO8+V+8GqBMlhUJ82am5HS6p7DTSmZNCDvgJ0YlEx8jPSTcZ6TEhVfdp0Y+dbq9f +BhMh41cMmSLXd4dwaYquJsv4xVcbOu2Cu+eo+GiGp28NqMjC65bhAAXYG0tSAxD3FeVhC +rZadmBHBZ4B8Qf+DOnj72i+SgryVcdE30EDcuy5SqI4OpLZT9ahGQx5iLfGj5zFhTqJVU GUIG+F9VmMkdISKQV0fn2ROytWOC8oNdS7oGgYcj3Sgwi5sdkDBJ9/ig930JqyZ1ZL7fWb pPjV4xicuYs36CHjooQCowS3o8+LZ+IBSe//Db92GgfGUXxqQL9mMDdGRo8c5w== 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 4M9YDC0TRSz18Bx; Sun, 21 Aug 2022 11:29:15 +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 27LBTELf004541; Sun, 21 Aug 2022 11:29:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27LBTEEt004540; Sun, 21 Aug 2022 11:29:14 GMT (envelope-from git) Date: Sun, 21 Aug 2022 11:29:14 GMT Message-Id: <202208211129.27LBTEEt004540@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: 37754cf7c81f - stable/13 - Fix unused variable warnings in tcp_hpts.c List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: 37754cf7c81f5172f3956148ad21b41cde55d9ad Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661081355; 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=hAlykwExeAZvyd2Pm5iH7s1tqPGYKar8F6QPAt8Vxos=; b=XwKj6KVmyIajYeXOhDWWo72MHWM6gGCYLrB8EPZMtUhTbYHNiZZXpibzECDPscl3/PLeNP MM7vY7r5D32v56eZT0zLkAVFwIUwXNiJ6SOGBLTMUx7SQFn53Y1Sf1C3/DsjBL/mGjHTGN p4rXh+kJmNuN6YZEBte0wTmZTgYDBrxL32fQoFbkw4lWqKboVSrIYlD836jwb9wSILdiae irmzc2xTtY/uaQOJpgKYOuhmVvznHGwoCG2m5KF3fYj8FzgZgfqkA4fSSz7gC7fIkoyodO kqaw8NcAh6+WtytZ/1COmvkLLRegRekeQn8LjcSD+CrFesnFIQepu00rh366qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661081355; a=rsa-sha256; cv=none; b=O82Bt4FMYDQGF/gOSmxNewR6GcV+wMn3e0QJmuXVwAR6OlsENgFQ7P7CZ9QTmV+iyJ/5ze pG1rB1/CYuDjJ6xvFtJU+pj1K4mJv5kdUQjL1Bc8LRFAFsFnmHtHXlYZjdyYFpScoE6ZGV RvSbq8UMwn8lEOcGGohgW88vCJ7vII97HWoo2X/XBP35nGrin1kqK73O46XU4goY16g3pF iEfN/Kim2bxg+XuqiblfPMPjMYL2S3Hu6aY959ixoc5Eq/XIekfFpzfpX5qeLxrVjS4A2Z 2XYz8ynTElCAZQMemMShT1iDuGJmpqY6FMFI2ZjOJyJ6uTEJNp0CkHHGVwPrHw== 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=37754cf7c81f5172f3956148ad21b41cde55d9ad commit 37754cf7c81f5172f3956148ad21b41cde55d9ad Author: Dimitry Andric AuthorDate: 2022-08-15 18:14:39 +0000 Commit: Dimitry Andric CommitDate: 2022-08-21 11:16:33 +0000 Fix unused variable warnings in tcp_hpts.c With clang 15, the following -Werror warning is produced: sys/netinet/tcp_hpts.c:1114:10: error: variable 'paced_cnt' set but not used [-Werror,-Wunused-but-set-variable] int32_t paced_cnt = 0; ^ sys/netinet/tcp_hpts.c:1112:11: error: variable 'total_slots_processed' set but not used [-Werror,-Wunused-but-set-variable] uint64_t total_slots_processed = 0; ^ The 'paced_cnt' variable was in tcp_hpts.c when it was first added, and the 'total_slots_processed' variable was added in d7955cc0ffdf9, but both appear to have been debugging aids that have never been used, so remove them. MFC after: 3 days (cherry picked from commit b33bfe6e157429ad764e9a883a5e3a194a6d1f9f) --- sys/netinet/tcp_hpts.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index a744153d338d..8f415dce3fe1 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1407,9 +1407,7 @@ tcp_hptsi(struct tcp_hpts_entry *hpts, int from_callout) struct tcpcb *tp; struct inpcb *inp = NULL, *ninp; struct timeval tv; - uint64_t total_slots_processed = 0; int32_t slots_to_run, i, error; - int32_t paced_cnt = 0; int32_t loop_cnt = 0; int32_t did_prefetch = 0; int32_t prefetch_ninp = 0; @@ -1529,9 +1527,7 @@ again: /* Record the new position */ orig_exit_slot = hpts->p_runningslot; } - total_slots_processed++; hpts->p_inp = inp; - paced_cnt++; KASSERT(hpts->p_runningslot == inp->inp_hptsslot, ("Hpts:%p inp:%p slot mis-aligned %u vs %u", hpts, inp, hpts->p_runningslot, inp->inp_hptsslot));