Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 7574a137a3f225b30753159e9d8cc97f1c9c9b05..8914bf1443eb3c7bd3f3f0c1167764a14731b948 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -817,7 +817,6 @@ if (is_win) { |
"-Wno-unused-function", # http://crbug.com/505316 |
"-Wno-unused-private-field", # http://crbug.com/505317 |
"-Wno-unused-value", # http://crbug.com/505318 |
- "-Wno-unused-variable", # http://crbug.com/505319 |
"-Wno-unused-local-typedef", # http://crbug.com/411648 |
] |
} |
@@ -998,6 +997,12 @@ config("no_chromium_code") { |
cflags += [ "-Wno-unused-result" ] |
} |
+ if (is_clang) { |
+ # Lots of third-party libraries have unused variables. Instead of |
+ # suppressing them individually, we just blanket suppress them here. |
+ cflags += [ "-Wno-unused-variable" ] |
+ } |
+ |
if (is_linux || is_android) { |
cflags += [ |
# Don't warn about printf format problems. This is off by default in gcc |