]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix unused variable warnings in tcp_hpts.c
authorDimitry Andric <dim@FreeBSD.org>
Mon, 15 Aug 2022 18:14:39 +0000 (20:14 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Mon, 15 Aug 2022 18:48:34 +0000 (20:48 +0200)
commitb33bfe6e157429ad764e9a883a5e3a194a6d1f9f
tree4007c118d769c8d92664fd7ccf497f0b6633983f
parentdb6b32867d6ed996f8a9aad41ca6ffbaa2088e59
Fix unused variable warnings in tcp_hpts.c

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

    sys/netinet/tcp_hpts.c:1114:10: error: variable 'paced_cnt' set but not used [-Werror,-Wunused-but-set-variable]
            int32_t paced_cnt = 0;
                    ^
    sys/netinet/tcp_hpts.c:1112:11: error: variable 'total_slots_processed' set but not used [-Werror,-Wunused-but-set-variable]
            uint64_t total_slots_processed = 0;
                     ^

The 'paced_cnt' variable was in tcp_hpts.c when it was first added, and
the 'total_slots_processed' variable was added in d7955cc0ffdf9, but
both appear to have been debugging aids that have never been used, so
remove them.

MFC after: 3 days
sys/netinet/tcp_hpts.c