git: 37754cf7c81f - stable/13 - Fix unused variable warnings in tcp_hpts.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 21 Aug 2022 11:29:14 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=37754cf7c81f5172f3956148ad21b41cde55d9ad commit 37754cf7c81f5172f3956148ad21b41cde55d9ad Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-08-15 18:14:39 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> 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));