diff options
author | Nathan Chancellor <nathan@kernel.org> | 2023-11-07 00:14:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-11-08 01:23:56 +0300 |
commit | 7425627b2b2cd671d5bf6541ce50f7cba8a76ad6 (patch) | |
tree | 57ac459eeed37c83799e32c4abeaba750bc793f6 /scripts/gdb/linux/proc.py | |
parent | c542b39b607dc0619e3b1b36e289600a555c4774 (diff) | |
download | linux-7425627b2b2cd671d5bf6541ce50f7cba8a76ad6.tar.xz |
tcp: Fix -Wc23-extensions in tcp_options_write()
Clang warns (or errors with CONFIG_WERROR=y) when CONFIG_TCP_AO is set:
net/ipv4/tcp_output.c:663:2: error: label at end of compound statement is a C23 extension [-Werror,-Wc23-extensions]
663 | }
| ^
1 error generated.
On earlier releases (such as clang-11, the current minimum supported
version for building the kernel) that do not support C23, this was a
hard error unconditionally:
net/ipv4/tcp_output.c:663:2: error: expected statement
}
^
1 error generated.
While adding a semicolon after the label would resolve this, it is more
in line with the kernel as a whole to refactor this block into a
standalone function, which means the goto a label construct can just be
replaced with a return statement. Do so to resolve the warning.
Closes: https://github.com/ClangBuiltLinux/linux/issues/1953
Fixes: 1e03d32bea8e ("net/tcp: Add TCP-AO sign to outgoing packets")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions