summaryrefslogtreecommitdiff
path: root/third_party/BUILD.gn
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-07-01 14:08:08 -0700
committerNico Weber <thakis@chromium.org>2015-07-01 14:11:22 -0700
commit2827bddd85edd37a9af6fb4e47882334f007e59b (patch)
treefa1bac0681681b5dc31997a23a15d01ad377b040 /third_party/BUILD.gn
parent606346f584700bdae0741066f2e6d2481744032c (diff)
downloadpdfium-2827bddd85edd37a9af6fb4e47882334f007e59b.tar.xz
Cherry-pick to XFA: Fix some clang warnings with -Wmissing-braces in pdfium.
Clang warns if there are missing braces around a subobject initializer. The most common idiom that triggers this is: STRUCT s = {0}; if the first field of STRUCT is itself a struct. This can be more simply written as: STRUCT s = {}; which also prevents the warning from firing. Other instances of the warning have been fixed by adding braces where appropriate. R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1213523004.
Diffstat (limited to 'third_party/BUILD.gn')
-rw-r--r--third_party/BUILD.gn8
1 files changed, 8 insertions, 0 deletions
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index 549df8a3ae..44d5e75831 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -95,10 +95,18 @@ source_set("fx_agg") {
}
source_set("fx_lcms2") {
+ config("fx_lcms2_warnings") {
+ if (is_clang) {
+ # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this
+ # library doesn't appear to have this problem.
+ cflags = [ "-Wno-missing-braces" ]
+ }
+ }
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
"//third_party/pdfium:pdfium_config",
+ ":fx_lcms2_warnings",
]
sources = [
"lcms2-2.6/include/lcms2.h",