Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Aug 2022 19:27:58 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 57cdd13d072e - main - Suppress unused variable warning in tcp_stacks's rack.c
Message-ID:  <202208141927.27EJRwKh044389@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=57cdd13d072e56bf68c7b3d3b446aaf01288e12b

commit 57cdd13d072e56bf68c7b3d3b446aaf01288e12b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-08-14 19:27:16 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-08-14 19:27:35 +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
---
 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 0cb7b5cb4680..0c91c9c6703f 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -17406,7 +17406,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?202208141927.27EJRwKh044389>