Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(893)

Unified Diff: chrome/browser/ui/libgtk2ui/BUILD.gn

Issue 722513003: Enable -Wunused-local-typedef (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/libgtk2ui/BUILD.gn
diff --git a/chrome/browser/ui/libgtk2ui/BUILD.gn b/chrome/browser/ui/libgtk2ui/BUILD.gn
index 0d34b7a1a5be1baddb5d94857396fbccb6eb1b10..c5e1668b56b3d8e544c37928d9f8657f89438087 100644
--- a/chrome/browser/ui/libgtk2ui/BUILD.gn
+++ b/chrome/browser/ui/libgtk2ui/BUILD.gn
@@ -72,12 +72,6 @@ component("libgtk2ui") {
"gconf_listener.h",
]
}
- if (is_clang) {
- # G_DEFINE_TYPE automatically generates a *get_instance_private inline
- # function after glib 2.37. That's unused. Prevent to complain about it.
- cflags = [ "-Wno-unused-function" ]
- }
-
defines = [ "LIBGTK2UI_IMPLEMENTATION" ]
configs += [
@@ -87,6 +81,23 @@ component("libgtk2ui") {
"//printing:cups",
]
+ # gn orders flags on a target before flags from configs. The default config
+ # adds -Wall, and these flags have to be after -Wall -- so they need to come
+ # from a config and can't be on the target directly.
+ config("libgtk2ui_warnings") {
+ if (is_clang) {
+ cflags = [
+ # G_DEFINE_TYPE automatically generates a *get_instance_private inline
+ # function after glib 2.37. That's unused. Prevent to complain about it.
+ "-Wno-unused-function",
+
+ # G_STATIC_ASSERT uses a typedef as a static_assert.
+ "-Wno-unused-local-typedef",
+ ]
+ }
+ }
+ configs += [ ":libgtk2ui_warnings", ]
+
deps = [
"//base",
"//base:i18n",
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/event_router.cc ('k') | chrome/browser/ui/libgtk2ui/libgtk2ui.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698