From def5c7d8af6ecb08da02c302f6c2600197d1d688 Mon Sep 17 00:00:00 2001 From: John Abd-El-Malek Date: Mon, 9 Jun 2014 16:07:18 -0700 Subject: Disable pointer-to-int conversion warning. In this case the warning is benign. Original patch by Brett Wilson R=jam@chromium.org Review URL: https://codereview.chromium.org/319033002 --- BUILD.gn | 6 ++++++ pdfium.gyp | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/BUILD.gn b/BUILD.gn index 2021b4cd89..fea9e33cc8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -474,6 +474,12 @@ static_library("fxcodec") { if (is_posix) { configs -= [ "//build/config/gcc:no_exceptions" ] } + + if (is_posix) { + # core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int + # conversion to check that an address is 16-bit aligned (benign). + cflags_c = [ "-Wno-pointer-to-int-cast" ] + } configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] } diff --git a/pdfium.gyp b/pdfium.gyp index 390b3f054e..7d62b1d164 100644 --- a/pdfium.gyp +++ b/pdfium.gyp @@ -487,6 +487,13 @@ 'core/src/fxcodec/libjpeg/makefile', 'core/src/fxcodec/libjpeg/transupp.h', ], + 'conditions': [ + ['os_posix==1', { + # core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int + # conversion to check that an address is 16-bit aligned (benign). + 'cflags_c': [ '-Wno-pointer-to-int-cast' ], + }], + ], }, { 'target_name': 'fxcrt', -- cgit v1.2.3