All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [PATCH 19.11 1/4] build: allow compile with stricter fallthrough warnings
Date: Thu, 25 Jul 2019 15:38:28 +0100	[thread overview]
Message-ID: <20190725143831.25116-2-bruce.richardson@intel.com> (raw)
In-Reply-To: <20190725143831.25116-1-bruce.richardson@intel.com>

DPDK currently compiles with implicit-fallthrough=2 warning level. With gcc
-Wextra flag, the default level is 3, so some minor changes are needed to
support this in DPDK.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/bonding/rte_eth_bond_pmd.c | 3 ++-
 drivers/net/fm10k/base/meson.build     | 3 ++-
 lib/librte_cmdline/cmdline_parse_num.c | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 6a6ed890a..728915d4a 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -2521,7 +2521,8 @@ bond_ethdev_link_update(struct rte_eth_dev *ethdev, int wait_to_complete)
 				bond_ctx->mode4.slave_link.link_autoneg;
 		ethdev->data->dev_link.link_duplex =
 				bond_ctx->mode4.slave_link.link_duplex;
-		/* fall through to update link speed */
+		/* fall through */
+		/* to update link speed */
 	case BONDING_MODE_ROUND_ROBIN:
 	case BONDING_MODE_BALANCE:
 	case BONDING_MODE_TLB:
diff --git a/drivers/net/fm10k/base/meson.build b/drivers/net/fm10k/base/meson.build
index 5525cdc82..9e1022fef 100644
--- a/drivers/net/fm10k/base/meson.build
+++ b/drivers/net/fm10k/base/meson.build
@@ -12,7 +12,8 @@ sources = [
 
 error_cflags = ['-Wno-unused-parameter', '-Wno-unused-value',
 	'-Wno-strict-aliasing', '-Wno-format-extra-args',
-	'-Wno-unused-variable', '-Wno-missing-field-initializers'
+	'-Wno-unused-variable', '-Wno-missing-field-initializers',
+	'-Wno-implicit-fallthrough'
 ]
 c_args = cflags
 if allow_experimental_apis
diff --git a/lib/librte_cmdline/cmdline_parse_num.c b/lib/librte_cmdline/cmdline_parse_num.c
index 182ac12f0..478f181b4 100644
--- a/lib/librte_cmdline/cmdline_parse_num.c
+++ b/lib/librte_cmdline/cmdline_parse_num.c
@@ -196,7 +196,7 @@ cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res,
 
 		case HEX:
 			st = HEX_OK;
-			/* fall-through no break */
+			/* fall-through */
 		case HEX_OK:
 			if (c >= '0' && c <= '9') {
 				if (add_to_res(c - '0', &res1, 16) < 0)
-- 
2.21.0


  reply	other threads:[~2019-07-25 14:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-25 14:38 [dpdk-dev] [PATCH 19.11 0/4] synchronise meson warnings with make Bruce Richardson
2019-07-25 14:38 ` Bruce Richardson [this message]
2019-07-25 14:38 ` [dpdk-dev] [PATCH 19.11 2/4] raw/ifpga: remove unneeded compiler flags Bruce Richardson
2019-07-25 14:38 ` [dpdk-dev] [PATCH 19.11 3/4] build: enable extra warnings for meson build Bruce Richardson
2019-07-25 14:38 ` [dpdk-dev] [PATCH 19.11 4/4] drivers: remove duplicated compiler flags Bruce Richardson
2019-10-07 14:17 ` [dpdk-dev] [PATCH 19.11 0/4] synchronise meson warnings with make Luca Boccassi
2019-10-07 14:30 ` [dpdk-dev] [PATCH v2 " Bruce Richardson
2019-10-07 14:30   ` [dpdk-dev] [PATCH v2 1/4] build: allow compile with stricter fallthrough warnings Bruce Richardson
2019-10-07 14:30   ` [dpdk-dev] [PATCH v2 2/4] raw/ifpga: remove unneeded compiler flags Bruce Richardson
2019-10-07 14:30   ` [dpdk-dev] [PATCH v2 3/4] build: enable extra warnings for meson build Bruce Richardson
2019-10-07 14:30   ` [dpdk-dev] [PATCH v2 4/4] drivers: remove duplicated compiler flags Bruce Richardson
2019-10-23 21:53   ` [dpdk-dev] [PATCH v2 0/4] synchronise meson warnings with make Thomas Monjalon

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=20190725143831.25116-2-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.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 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.