From: Bruce Richardson Date: Tue, 3 Jul 2018 10:31:15 +0000 (+0100) Subject: build: disable pointer to int warnings for 32-bit X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;ds=sidebyside;h=b67cc8a561756767e1934259c04be8a73a7528d8;p=dpdk.git 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 Acked-by: Hemant Agrawal --- diff --git a/config/meson.build b/config/meson.build index 272d4a838d..451cc52f8f 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')