From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id C1A861B20D for ; Fri, 8 Jun 2018 18:38:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jun 2018 09:38:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,490,1520924400"; d="scan'208";a="46302079" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.223]) by fmsmga008.fm.intel.com with ESMTP; 08 Jun 2018 09:38:37 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Date: Fri, 8 Jun 2018 17:38:04 +0100 Message-Id: <20180608163807.66737-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180608163807.66737-1-bruce.richardson@intel.com> References: <20180608163807.66737-1-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH 4/7] build: disable pointer to int conversion warnings for 32-bit 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: , X-List-Received-Date: Fri, 08 Jun 2018 16:38:39 -0000 Converting a 32-bit pointer to a 64-bit integer is generally safe, but generates a lot of warnings when compiling 32-bit code with meson. The warnings are not flagged when using make, so just disable them for 32-bit meson builds. Signed-off-by: Bruce Richardson --- config/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/meson.build b/config/meson.build index 50081b572..1531d9f0e 100644 --- a/config/meson.build +++ b/config/meson.build @@ -60,6 +60,10 @@ warning_flags = [ '-Wno-address-of-packed-member', '-Wno-format-truncation' ] +if cc.sizeof('void *') == 4 +# for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!! + warning_flags += '-Wno-pointer-to-int-cast' +endif foreach arg: warning_flags if cc.has_argument(arg) add_project_arguments(arg, language: 'c') -- 2.17.1