Disable pointer-to-int conversion warning.
authorJohn Abd-El-Malek <jam@chromium.org>
Mon, 9 Jun 2014 23:07:18 +0000 (16:07 -0700)
committerJohn Abd-El-Malek <jam@chromium.org>
Mon, 9 Jun 2014 23:07:18 +0000 (16:07 -0700)
In this case the warning is benign.

Original patch by Brett Wilson <brettw@chromium.org>

R=jam@chromium.org

Review URL: https://codereview.chromium.org/319033002

BUILD.gn
pdfium.gyp

index 2021b4c..fea9e33 100644 (file)
--- 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" ]
 }
 
index 390b3f0..7d62b1d 100644 (file)
         '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',