]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix unused variable warning in tcp_stacks's rack.c
authorDimitry Andric <dim@FreeBSD.org>
Sun, 14 Aug 2022 19:13:40 +0000 (21:13 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Sun, 14 Aug 2022 19:27:34 +0000 (21:27 +0200)
commite967183cb030dfc349c264520e5710bac70bcdd4
treefb57e6b0e18769c89634767538e3f398d6b7c1f8
parent762489657117037d963aa840374280583acd32c2
Fix unused variable warning in tcp_stacks's rack.c

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

    sys/netinet/tcp_stacks/rack.c:16148:6: error: variable 'cnt_thru' set but not used [-Werror,-Wunused-but-set-variable]
            int cnt_thru = 1;
                ^

The 'cnt_thru' variable is only used when TCP_ACCOUNTING is defined.
Ensure it is only declared and set in that case.

MFC after: 3 days
sys/netinet/tcp_stacks/rack.c