diff options
| author | Matthieu Baerts (NGI0) <matttbe@kernel.org> | 2026-02-05 18:34:24 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-02-06 20:35:07 -0800 |
| commit | 53e553369167d361bdd550d194122ac7cdb00f3c (patch) | |
| tree | d51dd9af1ca1ec8df879f5af56e070b5a460265e /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 136f1e168f4941021565f8c10ff4bb81b1f13f2c (diff) | |
selftests: mptcp: connect: fix maybe-uninitialize warn
This warning can be seen with GCC 15.2:
mptcp_connect.c: In function ‘main_loop’:
mptcp_connect.c:1422:37: warning: ‘peer’ may be used uninitialized [-Wmaybe-uninitialized]
1422 | if (connect(fd, peer->ai_addr, peer->ai_addrlen))
| ~~~~^~~~~~~~~
mptcp_connect.c:1377:26: note: ‘peer’ was declared here
1377 | struct addrinfo *peer;
| ^~~~
This variable is set in sock_connect_mptcp() in some conditions. If not,
this helper returns an error, and the program stops. So this is a false
positive, but better removing it by initialising peer to NULL.
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260205-net-mptcp-misc-fixes-6-19-rc8-v2-4-c2720ce75c34@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
