diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-08-15 18:14:39 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-08-15 18:48:34 +0000 |
commit | b33bfe6e157429ad764e9a883a5e3a194a6d1f9f (patch) | |
tree | 4007c118d769c8d92664fd7ccf497f0b6633983f | |
parent | db6b32867d6ed996f8a9aad41ca6ffbaa2088e59 (diff) | |
download | src-b33bfe6e157429ad764e9a883a5e3a194a6d1f9f.tar.gz src-b33bfe6e157429ad764e9a883a5e3a194a6d1f9f.zip |
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
-rw-r--r-- | sys/netinet/tcp_hpts.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 4df5a236dcce..b8d09523113f 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1109,9 +1109,7 @@ tcp_hptsi(struct tcp_hpts_entry *hpts, int from_callout) struct tcpcb *tp; struct inpcb *inp; 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; @@ -1258,8 +1256,6 @@ again: /* Record the new position */ orig_exit_slot = runningslot; } - total_slots_processed++; - paced_cnt++; INP_WLOCK(inp); if (inp->inp_hpts_cpu_set == 0) { |