build: fix gcc warning requiring Wformat
authorConor Walsh <conor.walsh@intel.com>
Thu, 19 Nov 2020 10:16:59 +0000 (10:16 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 22 Nov 2020 18:38:25 +0000 (19:38 +0100)
commit654e893436649ca6a876b0bd0f30b4357edc4462
tree0096dd38c22663904faeea54ebf8fb9a9b2c0f74
parent141492be9967c84ec3a41445200df8a34f5c39dd
build: fix gcc warning requiring Wformat

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: stable@dpdk.org
Signed-off-by: Conor Walsh <conor.walsh@intel.com>
Tested-by: Lingli Chen <linglix.chen@intel.com>
config/meson.build