From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH iproute2 2/5] fix fallthrough warnings
Date: Wed, 28 Jun 2023 16:38:10 -0700 [thread overview]
Message-ID: <20230628233813.6564-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20230628233813.6564-1-stephen@networkplumber.org>
In lib/utils.c comment for fallthrough was in wrong place
and one was missing in xfrm_state.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
ip/xfrm_state.c | 1 +
lib/utils.c | 3 +--
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
index a7b3d0e14156..9be65b2f8461 100644
--- a/ip/xfrm_state.c
+++ b/ip/xfrm_state.c
@@ -660,6 +660,7 @@ static int xfrm_state_modify(int cmd, unsigned int flags, int argc, char **argv)
case XFRM_MODE_BEET:
if (req.xsinfo.id.proto == IPPROTO_ESP)
break;
+ /* fallthrough */
default:
fprintf(stderr, "MODE value is invalid with XFRM-PROTO value \"%s\"\n",
strxf_xfrmproto(req.xsinfo.id.proto));
diff --git a/lib/utils.c b/lib/utils.c
index 01f3a5f7e4ea..b1f273054906 100644
--- a/lib/utils.c
+++ b/lib/utils.c
@@ -985,9 +985,8 @@ const char *rt_addr_n2a_r(int af, int len,
return inet_ntop(AF_INET6, &sa->sin6.sin6_addr,
buf, buflen);
}
-
- /* fallthrough */
}
+ /* fallthrough */
default:
return "???";
}
--
2.39.2
next prev parent reply other threads:[~2023-06-28 23:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 23:38 [PATCH iproute2 0/5] Warning fixes Stephen Hemminger
2023-06-28 23:38 ` [PATCH iproute2 1/5] dcb: fully initialize flag table Stephen Hemminger
2023-06-29 13:08 ` Petr Machata
2023-06-28 23:38 ` Stephen Hemminger [this message]
2023-06-29 13:54 ` [PATCH iproute2 2/5] fix fallthrough warnings Petr Machata
2023-06-28 23:38 ` [PATCH iproute2 3/5] ss: fix warning about empty if() Stephen Hemminger
2023-06-29 13:14 ` Petr Machata
2023-06-28 23:38 ` [PATCH iproute2 4/5] ct: check for invalid proto Stephen Hemminger
2023-06-29 13:44 ` Petr Machata
2023-06-28 23:38 ` [PATCH iproute2 5/5] ifstat: fix warning about conditional Stephen Hemminger
2023-06-29 13:49 ` Petr Machata
2023-06-29 16:10 ` [PATCH iproute2 0/5] Warning fixes patchwork-bot+netdevbpf
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=20230628233813.6564-3-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=netdev@vger.kernel.org \
/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).