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

Unified Diff: third_party/libusb/BUILD.gn

Issue 1269293003: Explicitly pass -Wno-unused-function to the targets that need it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gnnnnnnnnnnn Created 5 years, 4 months 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
« no previous file with comments | « third_party/brotli/brotli.gyp ('k') | third_party/libusb/libusb.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libusb/BUILD.gn
diff --git a/third_party/libusb/BUILD.gn b/third_party/libusb/BUILD.gn
index e6d371dbde0cf9e80aa4aae6e5ca2bb3e4298460..c7f4083d6b7b09d9d782e9fbae3d5d491a3baeb5 100644
--- a/third_party/libusb/BUILD.gn
+++ b/third_party/libusb/BUILD.gn
@@ -46,8 +46,18 @@ static_library("libusb") {
deps = []
include_dirs = [ "src/libusb/os" ]
+ config("libusb_warnings") {
+ if (is_clang) {
+ # guid_eq in windows_usb.c is unused.
+ cflags = [ "-Wno-unused-function" ]
+ if (is_linux && !use_udev) {
+ cflags += [ "-Wno-pointer-sign" ]
+ }
+ }
+ }
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":libusb_warnings" ]
public_configs = [ ":libusb_config" ]
@@ -95,9 +105,6 @@ static_library("libusb") {
if (is_linux && !use_udev) {
sources += [ "src/libusb/os/linux_netlink.c" ]
defines += [ "HAVE_LINUX_NETLINK_H" ]
- if (is_clang) {
- cflags += [ "-Wno-pointer-sign" ]
- }
}
if (is_win) {
« no previous file with comments | « third_party/brotli/brotli.gyp ('k') | third_party/libusb/libusb.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698