DPDK patches and discussions
 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] build: add unused parameter warnings to meson build
Date: Wed, 15 May 2019 12:38:47 +0100	[thread overview]
Message-ID: <20190515113847.46380-1-bruce.richardson@intel.com> (raw)
Message-ID: <20190515113847.SxoHeSulSwR7TgvEVgpdM1LFuv-0GW2w7URpjQGYW44@z> (raw)

To improve code quality we want to turn on as many warnings as we can in
the DPDK code, so turn on the "unused-parameter" warning in meson builds to
match that of the make builds. To ensure correct compilation, disable the
warning selectively for driver base code that otherwise would have issues.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 config/meson.build                 | 1 +
 drivers/net/i40e/base/meson.build  | 3 ++-
 drivers/net/ice/base/meson.build   | 1 +
 drivers/net/ixgbe/base/meson.build | 4 +++-
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/config/meson.build b/config/meson.build
index 0d25646f5..dbdfde6b8 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -143,6 +143,7 @@ add_project_arguments('-include', 'rte_config.h', language: 'c')
 
 # enable extra warnings and disable any unwanted warnings
 warning_flags = [
+	'-Wunused-parameter',
 	'-Wsign-compare',
 	'-Wcast-qual',
 	'-Wno-address-of-packed-member'
diff --git a/drivers/net/i40e/base/meson.build b/drivers/net/i40e/base/meson.build
index d4c8f872d..13d16b08d 100644
--- a/drivers/net/i40e/base/meson.build
+++ b/drivers/net/i40e/base/meson.build
@@ -13,7 +13,8 @@ sources = [
 
 error_cflags = ['-Wno-sign-compare', '-Wno-unused-value',
 		'-Wno-format', '-Wno-error=format-security',
-		'-Wno-strict-aliasing', '-Wno-unused-but-set-variable'
+		'-Wno-strict-aliasing', '-Wno-unused-but-set-variable',
+		'-Wno-unused-parameter',
 ]
 c_args = cflags
 if allow_experimental_apis
diff --git a/drivers/net/ice/base/meson.build b/drivers/net/ice/base/meson.build
index 624202567..eff155574 100644
--- a/drivers/net/ice/base/meson.build
+++ b/drivers/net/ice/base/meson.build
@@ -16,6 +16,7 @@ sources = [
 error_cflags = ['-Wno-unused-value',
 		'-Wno-unused-but-set-variable',
 		'-Wno-unused-variable',
+		'-Wno-unused-parameter',
 ]
 c_args = cflags
 
diff --git a/drivers/net/ixgbe/base/meson.build b/drivers/net/ixgbe/base/meson.build
index 21ac64bf5..bbd0f51ea 100644
--- a/drivers/net/ixgbe/base/meson.build
+++ b/drivers/net/ixgbe/base/meson.build
@@ -18,7 +18,9 @@ sources = [
 ]
 
 error_cflags = ['-Wno-unused-value',
-		'-Wno-unused-but-set-variable']
+		'-Wno-unused-but-set-variable',
+		'-Wno-unused-parameter',
+		]
 c_args = cflags
 if allow_experimental_apis
 	c_args += '-DALLOW_EXPERIMENTAL_API'
-- 
2.21.0


             reply	other threads:[~2019-05-15 11:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 11:38 Bruce Richardson [this message]
2019-05-15 11:38 ` Bruce Richardson
2019-05-15 14:39 ` Luca Boccassi
2019-05-15 14:39   ` Luca Boccassi
2019-06-03 22:07   ` 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=20190515113847.46380-1-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 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).