Skip to content

netinet/sctp_usrreq.c: fix gcc-16 build error #729

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2025

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Jul 19, 2025

Upcoming gcc-16 improved unused variable use detection and now reports unused cnt as:

usrsctplib/netinet/sctp_usrreq.c: In function 'sctp_setopt':
usrsctplib/netinet/sctp_usrreq.c:5571:29: error: variable 'cnt' set but not used [-Werror=unused-but-set-variable=]
 5571 |                         int cnt;
      |                             ^~~

The change drops unused cnt variable.

Upcoming `gcc-16` improved unused variable use detection and now
reports unused` cnt` as:

    usrsctplib/netinet/sctp_usrreq.c: In function 'sctp_setopt':
    usrsctplib/netinet/sctp_usrreq.c:5571:29: error: variable 'cnt' set but not used [-Werror=unused-but-set-variable=]
     5571 |                         int cnt;
          |                             ^~~

The change drops unused `cnt` variable.
@tuexen tuexen merged commit 33d7af1 into sctplab:master Jul 25, 2025
@trofi trofi deleted the gcc-16-unused-fix branch July 25, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants