]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: mptcp: connect: fix C23 extension warning
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 15 Aug 2025 17:28:25 +0000 (19:28 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Aug 2025 00:39:59 +0000 (17:39 -0700)
commit2eefbed30d46d5e68593baf6b52923e00e7678af
tree20ef545caa3152ee6e51cd4ef4cf65f9d5086dda
parentf92199f551e617fae028c5c5905ddd63e3616e18
selftests: mptcp: connect: fix C23 extension warning

GCC was complaining about the new label:

  mptcp_connect.c:187:2: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
    187 |         int err = getaddrinfo(node, service, hints, res);
        |         ^

Simply declare 'err' before the label to avoid this warning.

Fixes: a862771d1aa4 ("selftests: mptcp: use IPPROTO_MPTCP for getaddrinfo")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250815-net-mptcp-misc-fixes-6-17-rc2-v1-7-521fe9957892@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_connect.c