summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2018-07-03 11:31:15 +0100
committerThomas Monjalon <thomas@monjalon.net>2018-07-12 12:24:41 +0200
commitb67cc8a561756767e1934259c04be8a73a7528d8 (patch)
tree889067dadabf535f20fdff07d34f3f77c29a5992 /config
parent526ca5c6cca063c712942dc9d6bc33c3966a64a8 (diff)
downloaddpdk-b67cc8a561756767e1934259c04be8a73a7528d8.zip
dpdk-b67cc8a561756767e1934259c04be8a73a7528d8.tar.gz
dpdk-b67cc8a561756767e1934259c04be8a73a7528d8.tar.xz
build: disable pointer to int warnings for 32-bit
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 <bruce.richardson@intel.com> Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Diffstat (limited to 'config')
-rw-r--r--config/meson.build4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/meson.build b/config/meson.build
index 272d4a8..451cc52 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -59,6 +59,10 @@ warning_flags = [
'-Wcast-qual',
'-Wno-address-of-packed-member'
]
+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')