The branch main has been updated by siva:

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

commit b7e91f238c2f70e8432f56762499aebd0ab9960b
Author:     Siva Mahadevan <[email protected]>
AuthorDate: 2026-09-11 14:56:10 +0000
Commit:     Siva Mahadevan <[email protected]>
CommitDate: 2026-09-11 14:56:31 +0000

    sctp: remove unused variable
    
    This fixes the build with gcc 16 after the changes
    to -Wunused*[0].
    
    [0] https://gcc.gnu.org/gcc-16/porting_to.html#changes-to-wunused
    
    Reviewed by:    tuexen
    MFC after:      3 days
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D59590
---
 sys/netinet/sctp_usrreq.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c
index 94d57225c20b..7c615b4cd02c 100644
--- a/sys/netinet/sctp_usrreq.c
+++ b/sys/netinet/sctp_usrreq.c
@@ -4683,23 +4683,20 @@ sctp_setopt(struct socket *so, int optname, void 
*optval, size_t optsize,
                                break;
                        }
                        if (send_out) {
-                               int cnt;
                                uint16_t strm;
 
                                if (strrst->srs_number_streams) {
-                                       for (i = 0, cnt = 0; i < 
strrst->srs_number_streams; i++) {
+                                       for (i = 0; i < 
strrst->srs_number_streams; i++) {
                                                strm = 
strrst->srs_stream_list[i];
                                                if 
(stcb->asoc.strmout[strm].state == SCTP_STREAM_OPEN) {
                                                        
stcb->asoc.strmout[strm].state = SCTP_STREAM_RESET_PENDING;
-                                                       cnt++;
                                                }
                                        }
                                } else {
                                        /* Its all */
-                                       for (i = 0, cnt = 0; i < 
stcb->asoc.streamoutcnt; i++) {
+                                       for (i = 0; i < 
stcb->asoc.streamoutcnt; i++) {
                                                if (stcb->asoc.strmout[i].state 
== SCTP_STREAM_OPEN) {
                                                        
stcb->asoc.strmout[i].state = SCTP_STREAM_RESET_PENDING;
-                                                       cnt++;
                                                }
                                        }
                                }

Reply via email to