Skip to content

Commit 2eefbed

Browse files
matttbekuba-moo
authored andcommitted
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: a862771 ("selftests: mptcp: use IPPROTO_MPTCP for getaddrinfo") Cc: [email protected] Reviewed-by: Geliang Tang <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20250815-net-mptcp-misc-fixes-6-17-rc2-v1-7-521fe9957892@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f92199f commit 2eefbed

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/testing/selftests/net/mptcp/mptcp_connect.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,10 @@ static void xgetaddrinfo(const char *node, const char *service,
183183
struct addrinfo *hints,
184184
struct addrinfo **res)
185185
{
186-
again:
187-
int err = getaddrinfo(node, service, hints, res);
186+
int err;
188187

188+
again:
189+
err = getaddrinfo(node, service, hints, res);
189190
if (err) {
190191
const char *errstr;
191192

0 commit comments

Comments
 (0)