Date: Sun, 21 Aug 2022 11:29:38 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: f3a9d6009c18 - stable/12 - Suppress unused variable warning in tcp_stacks's rack.c Message-ID: <202208211129.27LBTceH005165@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=f3a9d6009c18ff40e19ffd9d61aa584cf57a6595 commit f3a9d6009c18ff40e19ffd9d61aa584cf57a6595 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-08-14 19:27:16 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-08-21 11:20:41 +0000 Suppress unused variable warning in tcp_stacks's rack.c With clang 15, the following -Werror warning is produced: sys/netinet/tcp_stacks/rack.c:17405:12: error: variable 'outstanding' set but not used [-Werror,-Wunused-but-set-variable] uint32_t outstanding; ^ The 'outstanding' variable was used later in the rack_output() function, but refactoring in 35c7bb340788f removed the usage. To avoid too much code churn, mark the variable unused to supress the warning. MFC after: 3 days (cherry picked from commit 57cdd13d072e56bf68c7b3d3b446aaf01288e12b) --- sys/netinet/tcp_stacks/rack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index d12344ed1b89..f9269c5f55cf 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -7597,7 +7597,7 @@ again: ipoptlen == 0) tso = 1; { - uint32_t outstanding; + uint32_t outstanding __unused; outstanding = tp->snd_max - tp->snd_una; if (tp->t_flags & TF_SENTFIN) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208211129.27LBTceH005165>