diff options
author | Lei Zhang <thestig@chromium.org> | 2016-02-26 12:33:18 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-02-26 12:33:18 -0800 |
commit | 8ba5b59356d506d3b9e976e7422e69bbd5bec8d6 (patch) | |
tree | b85991aee92475549d84e8cb68702960b85d1252 | |
parent | dfefa9b2c99e0588bf229e2b92d85c88e5f18a41 (diff) | |
download | pdfium-chromium/2665.tar.xz |
Silence shift-negative-value warnings only on POSIX/Clang.chromium/2665chromium/2664chromium/2663chromium/2662
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1740103002 .
-rw-r--r-- | third_party/BUILD.gn | 8 | ||||
-rw-r--r-- | third_party/third_party.gyp | 14 |
2 files changed, 14 insertions, 8 deletions
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index 933e92a2ac..92fbcaa9fb 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -179,7 +179,9 @@ source_set("fx_lcms2") { # This is only used for standalone builds. config("jpeg_warnings") { visibility = [ ":*" ] - cflags = [ "-Wno-shift-negative-value" ] + if (is_clang) { + cflags = [ "-Wno-shift-negative-value" ] + } } source_set("jpeg") { @@ -364,7 +366,9 @@ if (pdf_enable_xfa) { # TODO(dsinclair): Remove if fixed upstream. https://crbug.com/507712 config("fx_zlib_warnings") { visibility = [ ":*" ] - cflags = [ "-Wno-shift-negative-value" ] + if (is_clang) { + cflags = [ "-Wno-shift-negative-value" ] + } } source_set("fx_zlib") { diff --git a/third_party/third_party.gyp b/third_party/third_party.gyp index 0208fa14e3..6746230f1d 100644 --- a/third_party/third_party.gyp +++ b/third_party/third_party.gyp @@ -230,14 +230,12 @@ 'libjpeg/jversion.h', 'libjpeg/transupp.h', ], - 'cflags': [ - '-Wno-shift-negative-value', - ], 'conditions': [ ['os_posix==1', { 'cflags': [ '-Wno-main', '-Wno-missing-braces', + '-Wno-shift-negative-value', '-Wno-unused', ], }], @@ -316,9 +314,13 @@ 'zlib_v128/uncompr.c', 'zlib_v128/zutil.c', ], - 'cflags': [ - # TODO(dsinclair): Remove if fixed upstream. https://crbug.com/507712 - '-Wno-shift-negative-value', + 'conditions': [ + ['os_posix==1', { + 'cflags': [ + # TODO(dsinclair): Remove if fixed upstream. https://crbug.com/507712 + '-Wno-shift-negative-value', + ], + }], ], }, |