git: a7d40321e80c - stable/13 - Fix unused variable warning in tcp_stacks's bbr.c

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sun, 21 Aug 2022 11:29:01 UTC
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=a7d40321e80c6f3bb15b93be10970cc154f0a6a2

commit a7d40321e80c6f3bb15b93be10970cc154f0a6a2
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-08-14 19:06:07 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-08-21 11:10:50 +0000

    Fix unused variable warning in tcp_stacks's bbr.c
    
    With clang 15, the following -Werror warning is produced:
    
    sys/netinet/tcp_stacks/bbr.c:11925:11: error: variable 'rtr_cnt' set but not used [-Werror,-Wunused-but-set-variable]
            uint32_t rtr_cnt = 0;
                     ^
    
    The 'rtr_cnt' variable was in bbr.c when it was first added, but it
    appears to have been a debugging aid that has never been used, so remove
    it.
    
    MFC after:      3 days
    
    (cherry picked from commit 762489657117037d963aa840374280583acd32c2)
---
 sys/netinet/tcp_stacks/bbr.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c
index 8f1c0f58b627..008b43829613 100644
--- a/sys/netinet/tcp_stacks/bbr.c
+++ b/sys/netinet/tcp_stacks/bbr.c
@@ -11957,7 +11957,6 @@ bbr_output_wtime(struct tcpcb *tp, const struct timeval *tv)
 	int32_t prefetch_rsm = 0;
  	uint32_t what_we_can = 0;
 	uint32_t tot_len = 0;
-	uint32_t rtr_cnt = 0;
 	uint32_t maxseg, pace_max_segs, p_maxseg;
 	int32_t csum_flags = 0;
  	int32_t hw_tls;
@@ -12270,7 +12269,6 @@ recheck_resend:
 			goto recheck_resend;
 #endif
 		}
-		rtr_cnt++;
 		if (rsm->r_flags & BBR_HAS_SYN) {
 			/* Only retransmit a SYN by itself */
 			len = 0;
@@ -12319,7 +12317,6 @@ recheck_resend:
 		bbr->r_ctl.rc_tlp_send = NULL;
 		sack_rxmit = 1;
 		len = rsm->r_end - rsm->r_start;
-		rtr_cnt++;
 		if ((bbr->rc_resends_use_tso == 0) && (len > maxseg))
 			len = maxseg;