HomeFreeBSD

Fix unused variable warning in sctp_timer.c

Description

Fix unused variable warning in sctp_timer.c

With clang 15, the following -Werror warning is produced:

sys/netinet/sctp_timer.c:510:6: error: variable 'recovery_cnt' set but not used [-Werror,-Wunused-but-set-variable]
        int recovery_cnt = 0;
            ^

The 'recovery_cnt' variable is only used when INVARIANTS is undefined.
Ensure it is only declared and set in that case.

MFC after: 3 days

(cherry picked from commit 5bfd8cf3691381c19296d76d7944d6c1df5f4a75)

Details

Provenance
dimAuthored on Jul 25 2022, 8:06 PM
Parents
rG066e0c39f4ba: ftpd(8): do not refer to now unused libxo(3)
Branches
Unknown
Tags
Unknown