From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: mptcp@lists.linux.dev
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
Subject: [PATCH mptcp-net 0/2] selftests: mptcp: connect: fix C23 extension warning
Date: Sun, 03 Aug 2025 14:13:42 +0200 [thread overview]
Message-ID: <20250803-sft-mptcp-warn-gcc-v1-0-6d87808721ea@kernel.org> (raw)
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);
| ^
mptcp_inq.c:79:2: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
79 | int err = getaddrinfo(node, service, hints, res);
| ^
mptcp_sockopt.c:166:2: warning: label followed by a declaration is a C23 extension [-Wc23-extensions]
166 | int err = getaddrinfo(node, service, hints, res);
| ^
Simply declare 'err' before the label to avoid this warning.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Matthieu Baerts (NGI0) (2):
selftests: mptcp: connect: fix C23 extension warning
selftests: mptcp: sockopt: fix C23 extension warning
tools/testing/selftests/net/mptcp/mptcp_connect.c | 5 +++--
tools/testing/selftests/net/mptcp/mptcp_inq.c | 5 +++--
tools/testing/selftests/net/mptcp/mptcp_sockopt.c | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
---
base-commit: 5c7ec796258e1599e2033ae0f40434b2ba6ca21c
change-id: 20250803-sft-mptcp-warn-gcc-4808047d562e
Best regards,
--
Matthieu Baerts (NGI0) <matttbe@kernel.org>
next reply other threads:[~2025-08-03 12:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-03 12:13 Matthieu Baerts (NGI0) [this message]
2025-08-03 12:13 ` [PATCH mptcp-net 1/2] selftests: mptcp: connect: fix C23 extension warning Matthieu Baerts (NGI0)
2025-08-03 12:13 ` [PATCH mptcp-net 2/2] selftests: mptcp: sockopt: " Matthieu Baerts (NGI0)
2025-08-03 14:08 ` [PATCH mptcp-net 0/2] selftests: mptcp: connect: " Geliang Tang
2025-08-04 8:32 ` Matthieu Baerts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250803-sft-mptcp-warn-gcc-v1-0-6d87808721ea@kernel.org \
--to=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).