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 3E78AA04DD for ; Thu, 19 Nov 2020 11:17:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C4085C86E; Thu, 19 Nov 2020 11:17:38 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id A60A4DED; Thu, 19 Nov 2020 11:17:33 +0100 (CET) IronPort-SDR: S22lGQ3XYIXZMYndKN8qvg4n5BevEINkZKvpZPWB41XSGezzczsZzCt31cetRQl4Xv9V7BaLmu bbzthIfgLW1A== X-IronPort-AV: E=McAfee;i="6000,8403,9809"; a="232885233" X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="232885233" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2020 02:17:31 -0800 IronPort-SDR: PHH7hpfuf9afmTgMsYwNiZplNQDiQQ8faOuK6pwS03fX9ERXxe67t12FBsZxm4zwSgWl72ZT13 oa9lEfwtQBiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,490,1596524400"; d="scan'208";a="330887523" Received: from silpixa00400466.ir.intel.com ([10.237.213.98]) by orsmga006.jf.intel.com with ESMTP; 19 Nov 2020 02:17:29 -0800 From: Conor Walsh 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 , Chen@dpdk.org Date: Thu, 19 Nov 2020 10:16:59 +0000 Message-Id: <20201119101700.3869583-2-conor.walsh@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201119101700.3869583-1-conor.walsh@intel.com> References: <20201118181103.3865787-1-conor.walsh@intel.com> <20201119101700.3869583-1-conor.walsh@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v3 1/2] build: fix gcc compile warnings by adding wformat X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 Tested-by: Chen, LingliX --- 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