git: 8dd6ab0fd096 - stable/12 - Fix unused variable warning in sctp_output.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Jul 2022 18:48:18 UTC
The branch stable/12 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=8dd6ab0fd0966d3ef22f3b475dc6f50bdff5ee7b
commit 8dd6ab0fd0966d3ef22f3b475dc6f50bdff5ee7b
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-25 19:50:40 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:35:36 +0000
Fix unused variable warning in sctp_output.c
With clang 15, the following -Werror warning is produced:
sys/netinet/sctp_output.c:9367:33: error: variable 'cnt_thru' set but not used [-Werror,-Wunused-but-set-variable]
int no_fragmentflg, bundle_at, cnt_thru;
^
The 'cnt_thru' variable was in sctp_output.c when it was first added,
but appears to have been a debugging aid that has never been used, so
remove it.
MFC after: 3 days
(cherry picked from commit 9057feddc4b05d2b2b29e4db274c28af3d574d76)
---
sys/netinet/sctp_output.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 4277caa0f070..0fee3fa369e7 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -9411,7 +9411,7 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
struct mbuf *m, *endofchain;
struct sctp_nets *net = NULL;
uint32_t tsns_sent = 0;
- int no_fragmentflg, bundle_at, cnt_thru;
+ int no_fragmentflg, bundle_at;
unsigned int mtu;
int error, i, one_chunk, fwd_tsn, ctl_cnt, tmr_started;
struct sctp_auth_chunk *auth = NULL;
@@ -9480,7 +9480,6 @@ sctp_chunk_retransmission(struct sctp_inpcb *inp,
}
}
one_chunk = 0;
- cnt_thru = 0;
/* do we have control chunks to retransmit? */
if (m != NULL) {
/* Start a timer no matter if we succeed or fail */
@@ -9796,7 +9795,6 @@ one_chunk_around:
/* (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); */
/* For auto-close */
- cnt_thru++;
if (*now_filled == 0) {
(void)SCTP_GETTIME_TIMEVAL(&asoc->time_last_sent);
*now = asoc->time_last_sent;