From: Conor Walsh <conor.walsh@intel.com> To: bruce.richardson@intel.com, ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com, bluca@debian.org, stuart.schacher@broadcom.com, venkatkumar.duvvuru@broadcom.com, michael.wildt@broadcom.com Cc: dev@dpdk.org, stable@dpdk.org, linglix.chen@intel.com, thomas@monjalon.net, Conor Walsh <conor.walsh@intel.com>, Chen@dpdk.org Subject: [dpdk-dev] [PATCH v3 1/2] build: fix gcc compile warnings by adding wformat Date: Thu, 19 Nov 2020 10:16:59 +0000 Message-ID: <20201119101700.3869583-2-conor.walsh@intel.com> (raw) In-Reply-To: <20201119101700.3869583-1-conor.walsh@intel.com> On some CentOS/RHEL systems using gcc 8.3.1 to compile dpdk, gcc shows a warning on every build step saying that -Wformat-nonliteral and -Wformat-security warnings will be ignored unless -Wformat is also specified as a compiler flag. When the build is run with -werror the build will fail due to these warnings. Exact warning returned: cc1: error: -Wformat-nonliteral ignored without -Wformat [-Werror=format-nonliteral] cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] cc1: all warnings being treated as errors This patch adds the -Wformat flag to config/meson.build. The warning id 181 has also been suppressed in icc as icc was showing false positives with -Wformat enabled. Fixes: 524a0d5d66b9 ("build: enable extra warnings with meson") Cc: bruce.richardson@intel.com Signed-off-by: Conor Walsh <conor.walsh@intel.com> Tested-by: Chen, LingliX <linglix.chen@intel.com> --- config/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config/meson.build b/config/meson.build index a29693b883..c02802c18e 100644 --- a/config/meson.build +++ b/config/meson.build @@ -194,6 +194,7 @@ warning_flags = [ # additional warnings in alphabetical order '-Wcast-qual', '-Wdeprecated', + '-Wformat', '-Wformat-nonliteral', '-Wformat-security', '-Wmissing-declarations', @@ -220,7 +221,7 @@ if not dpdk_conf.get('RTE_ARCH_64') warning_flags += '-Wno-pointer-to-int-cast' endif if cc.get_id() == 'intel' - warning_ids = [188, 2203, 2279, 2557, 3179, 3656] + warning_ids = [181, 188, 2203, 2279, 2557, 3179, 3656] foreach i:warning_ids warning_flags += '-diag-disable=@0@'.format(i) endforeach -- 2.25.1
next prev parent reply other threads:[~2020-11-19 10:17 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-12 11:35 [dpdk-dev] [PATCH v1] build: add Wformat to fix gcc compile error Conor Walsh 2020-11-12 18:47 ` Thomas Monjalon 2020-11-13 13:54 ` Walsh, Conor 2020-11-13 3:39 ` Chen, LingliX 2020-11-18 18:11 ` [dpdk-dev] [PATCH v2 0/2] build: add Wformat to fix gcc compile warnings and format fixes Conor Walsh 2020-11-18 18:11 ` [dpdk-dev] [PATCH v2 1/2] build: fix gcc compile warnings by adding wformat Conor Walsh 2020-11-18 18:11 ` [dpdk-dev] [PATCH v2 2/2] net/bnxt: fix format characters for unsigned values Conor Walsh 2020-11-18 18:37 ` [dpdk-dev] [PATCH v2 0/2] build: add Wformat to fix gcc compile warnings and format fixes Luca Boccassi 2020-11-19 10:24 ` Walsh, Conor 2020-11-19 10:16 ` [dpdk-dev] [PATCH v3 " Conor Walsh 2020-11-19 10:16 ` Conor Walsh [this message] 2020-11-20 7:23 ` [dpdk-dev] [PATCH v3 1/2] build: fix gcc compile warnings by adding wformat Chen, LingliX 2020-11-19 10:17 ` [dpdk-dev] [PATCH v3 2/2] net/bnxt: fix format characters for unsigned values Conor Walsh 2020-11-19 23:12 ` Ajit Khaparde 2020-11-22 20:07 ` [dpdk-dev] [dpdk-stable] [PATCH v3 0/2] build: add Wformat to fix gcc compile warnings and format fixes 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=20201119101700.3869583-2-conor.walsh@intel.com \ --to=conor.walsh@intel.com \ --cc=Chen@dpdk.org \ --cc=ajit.khaparde@broadcom.com \ --cc=bluca@debian.org \ --cc=bruce.richardson@intel.com \ --cc=dev@dpdk.org \ --cc=linglix.chen@intel.com \ --cc=michael.wildt@broadcom.com \ --cc=somnath.kotur@broadcom.com \ --cc=stable@dpdk.org \ --cc=stuart.schacher@broadcom.com \ --cc=thomas@monjalon.net \ --cc=venkatkumar.duvvuru@broadcom.com \ /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
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git