]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: mptcp: Mark xerror and die_perror __noreturn
authorAnkit Khushwaha <ankitkhushwaha.linux@gmail.com>
Thu, 1 Jan 2026 17:28:40 +0000 (22:58 +0530)
committerJakub Kicinski <kuba@kernel.org>
Tue, 6 Jan 2026 00:28:07 +0000 (16:28 -0800)
commit2fa98059fd5a0936d0951bd14f8990ae0aa5272a
treebec418ce1b83bc36bda648fda0ee6059c30fe402
parentf5e9ba959960fb9771c6e4fb1f075b8b74f4e877
selftests: mptcp: Mark xerror and die_perror __noreturn

Compiler reports potential uses of uninitialized variables in
mptcp_connect.c when xerror() is called from failure paths.

mptcp_connect.c:1262:11: warning: variable 'raw_addr' is used
      uninitialized whenever 'if' condition is false
      [-Wsometimes-uninitialized]

xerror() terminates execution by calling exit(), but it is not visible
to the compiler & assumes control flow may continue past the call.

Annotate xerror() with __noreturn so the compiler can correctly reason
about control flow and avoid false-positive uninitialized variable
warnings.

Signed-off-by: Ankit Khushwaha <ankitkhushwaha.linux@gmail.com>
Link: https://patch.msgid.link/20260101172840.90186-1-ankitkhushwaha.linux@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/Makefile
tools/testing/selftests/net/mptcp/mptcp_connect.c
tools/testing/selftests/net/mptcp/mptcp_diag.c
tools/testing/selftests/net/mptcp/mptcp_inq.c
tools/testing/selftests/net/mptcp/mptcp_sockopt.c