From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A2807A2EEB for ; Mon, 7 Oct 2019 16:30:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44F321C1C3; Mon, 7 Oct 2019 16:30:29 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id D43541C1A2 for ; Mon, 7 Oct 2019 16:30:25 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Oct 2019 07:30:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,268,1566889200"; d="scan'208";a="368131090" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by orsmga005.jf.intel.com with ESMTP; 07 Oct 2019 07:30:20 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: bluca@debian.org, Bruce Richardson Date: Mon, 7 Oct 2019 15:30:10 +0100 Message-Id: <20191007143013.16252-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191007143013.16252-1-bruce.richardson@intel.com> References: <20190725143831.25116-1-bruce.richardson@intel.com> <20191007143013.16252-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/4] build: allow compile with stricter fallthrough warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Acked-by: Luca Boccassi --- 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 97ab3f29f..a28827b35 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2385,7 +2385,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