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

Details

Provenance
dimAuthored on Jul 25 2022, 8:06 PM
Parents
rG9057feddc4b0: Fix unused variable warning in sctp_output.c
Branches
Unknown
Tags
Unknown