All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-net 0/2] selftests: mptcp: connect: fix C23 extension warning
@ 2025-08-03 12:13 Matthieu Baerts (NGI0)
  2025-08-03 12:13 ` [PATCH mptcp-net 1/2] " Matthieu Baerts (NGI0)
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Matthieu Baerts (NGI0) @ 2025-08-03 12:13 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts (NGI0)

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>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-04  8:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-03 12:13 [PATCH mptcp-net 0/2] selftests: mptcp: connect: fix C23 extension warning Matthieu Baerts (NGI0)
2025-08-03 12:13 ` [PATCH mptcp-net 1/2] " 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.