diff options
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/brotli/BUILD.gn | 9 | ||||
-rw-r--r-- | third_party/brotli/brotli.gyp | 8 | ||||
-rw-r--r-- | third_party/libusb/BUILD.gn | 13 | ||||
-rw-r--r-- | third_party/libusb/libusb.gyp | 6 | ||||
-rw-r--r-- | third_party/libxml/BUILD.gn | 39 | ||||
-rw-r--r-- | third_party/libxml/libxml.gyp | 3 | ||||
-rw-r--r-- | third_party/libxslt/BUILD.gn | 17 | ||||
-rw-r--r-- | third_party/libxslt/libxslt.gyp | 3 | ||||
-rw-r--r-- | third_party/snappy/BUILD.gn | 8 | ||||
-rw-r--r-- | third_party/snappy/snappy.gyp | 5 | ||||
-rw-r--r-- | third_party/sqlite/BUILD.gn | 28 | ||||
-rw-r--r-- | third_party/sqlite/sqlite.gyp | 10 | ||||
-rw-r--r-- | third_party/usrsctp/BUILD.gn | 7 | ||||
-rw-r--r-- | third_party/usrsctp/usrsctp.gyp | 6 | ||||
-rw-r--r-- | third_party/yasm/BUILD.gn | 12 | ||||
-rw-r--r-- | third_party/yasm/yasm.gyp | 7 |
16 files changed, 144 insertions, 37 deletions
diff --git a/third_party/brotli/BUILD.gn b/third_party/brotli/BUILD.gn index 8e1c111..2975f03 100644 --- a/third_party/brotli/BUILD.gn +++ b/third_party/brotli/BUILD.gn @@ -23,8 +23,17 @@ source_set("brotli") { "dec/types.h", ] + config("brotli_warnings") { + if (is_clang) { + # IncrementalCopyFastPath in decode.c can be unused. + # (The file looks very different upstream, this is probably no longer + # needed after rolling brotli the next time.) + cflags = [ "-Wno-unused-function" ] + } + } configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":brotli_warnings" ] # Since we are never debug brotli, freeze the optimizations to -O2. if (is_debug) { diff --git a/third_party/brotli/brotli.gyp b/third_party/brotli/brotli.gyp index 9c47b1f..38c4729 100644 --- a/third_party/brotli/brotli.gyp +++ b/third_party/brotli/brotli.gyp @@ -29,6 +29,14 @@ 'dec/transform.h', 'dec/types.h', ], + 'variables': { + 'clang_warning_flags': [ + # IncrementalCopyFastPath in decode.c can be unused. + # (The file looks very different upstream, this is probably no longer + # needed after rolling brotli the next time.) + '-Wno-unused-function', + ], + }, 'conditions': [ ['os_posix==1 and (target_arch=="arm" or target_arch=="armv7" or target_arch=="arm64")', { 'cflags!': ['-Os'], diff --git a/third_party/libusb/BUILD.gn b/third_party/libusb/BUILD.gn index e6d371db..c7f4083 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) { diff --git a/third_party/libusb/libusb.gyp b/third_party/libusb/libusb.gyp index 21ce243..85f5230 100644 --- a/third_party/libusb/libusb.gyp +++ b/third_party/libusb/libusb.gyp @@ -23,6 +23,12 @@ 'src/libusb/version.h', 'src/libusb/version_nano.h', ], + 'variables': { + 'clang_warning_flags': [ + # guid_eq in windows_usb.c is unused. + '-Wno-unused-function', + ], + }, 'include_dirs': [ 'src', 'src/libusb', diff --git a/third_party/libxml/BUILD.gn b/third_party/libxml/BUILD.gn index 58a5f1c..c967608 100644 --- a/third_party/libxml/BUILD.gn +++ b/third_party/libxml/BUILD.gn @@ -167,33 +167,34 @@ static_library("libxml") { defines = [ "_REENTRANT" ] } - if (is_clang) { - cflags = [ - # libxml passes `const unsigned char*` through `const char*`. - "-Wno-pointer-sign", - - # pattern.c and uri.c both have an intentional `for (...);` / - # `while(...);` loop. I submitted a patch to move the `'` to its own - # line, but until that's landed suppress the warning: - "-Wno-empty-body", - - # debugXML.c compares array 'arg' to NULL. - "-Wno-tautological-pointer-compare", - - # threads.c attempts to forward declare a pthread_equal which doesn't - # match the prototype in pthreads.h - "-Wno-ignored-attributes", - ] - } config("libxml_warnings") { if (is_clang) { - cflags += [ + cflags = [ + # libxml passes `const unsigned char*` through `const char*`. + "-Wno-pointer-sign", + + # pattern.c and uri.c both have an intentional `for (...);` / + # `while(...);` loop. I submitted a patch to move the `'` to its own + # line, but until that's landed suppress the warning: + "-Wno-empty-body", + + # debugXML.c compares array 'arg' to NULL. + "-Wno-tautological-pointer-compare", + + # threads.c attempts to forward declare a pthread_equal which doesn't + # match the prototype in pthreads.h + "-Wno-ignored-attributes", + # libxml casts from int to long to void*. "-Wno-int-to-void-pointer-cast", # libxml passes a volatile LPCRITICAL_SECTION* to a function expecting # a void* volatile*. "-Wno-incompatible-pointer-types", + + # trio_is_special_quantity and trio_is_negative are only + # used with certain preprocessor defines set. + "-Wno-unused-function", ] } } diff --git a/third_party/libxml/libxml.gyp b/third_party/libxml/libxml.gyp index 584bba8..493ed04 100644 --- a/third_party/libxml/libxml.gyp +++ b/third_party/libxml/libxml.gyp @@ -217,6 +217,9 @@ # libxml passes a volatile LPCRITICAL_SECTION* to a function # expecting a void* volatile*. '-Wno-incompatible-pointer-types', + # trio_is_special_quantity and trio_is_negative are only + # used with certain preprocessor defines set. + '-Wno-unused-function', ], }, 'include_dirs': [ diff --git a/third_party/libxslt/BUILD.gn b/third_party/libxslt/BUILD.gn index 24325b0..6b46db3 100644 --- a/third_party/libxslt/BUILD.gn +++ b/third_party/libxslt/BUILD.gn @@ -59,8 +59,21 @@ static_library("libxslt") { "win32/config.h", ] + config("libxslt_warnings") { + if (is_clang) { + cflags = [ + # libxslt stores a char[3] in a `const unsigned char*`. + "-Wno-pointer-sign", + + # xsltDefaultRegion and xsltCalibrateTimestamps are only + # used with certain preprocessor defines set. + "-Wno-unused-function", + ] + } + } configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":libxslt_warnings" ] public_configs = [ ":libxslt_config" ] cflags = [] @@ -73,10 +86,6 @@ static_library("libxslt") { include_dirs = [ "mac" ] } - if (is_clang) { - cflags += [ "-Wno-pointer-sign" ] - } - deps = [ "//third_party/libxml", ] diff --git a/third_party/libxslt/libxslt.gyp b/third_party/libxslt/libxslt.gyp index 32a5703..b543659 100644 --- a/third_party/libxslt/libxslt.gyp +++ b/third_party/libxslt/libxslt.gyp @@ -114,6 +114,9 @@ 'clang_warning_flags': [ # libxslt stores a char[3] in a `const unsigned char*`. '-Wno-pointer-sign', + # xsltDefaultRegion and xsltCalibrateTimestamps are only + # used with certain preprocessor defines set. + '-Wno-unused-function', ], }, 'conditions': [ diff --git a/third_party/snappy/BUILD.gn b/third_party/snappy/BUILD.gn index e8de575..97cce89 100644 --- a/third_party/snappy/BUILD.gn +++ b/third_party/snappy/BUILD.gn @@ -27,8 +27,16 @@ static_library("snappy") { "src/snappy.h", ] + config("snappy_warnings") { + if (is_clang) { + # ComputeTable is unused, + # https://code.google.com/p/snappy/issues/detail?id=96 + cflags = [ "-Wno-unused-function" ] + } + } configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":snappy_warnings" ] public_configs = [ ":snappy_config" ] if (is_win) { diff --git a/third_party/snappy/snappy.gyp b/third_party/snappy/snappy.gyp index ac0186f..f029259 100644 --- a/third_party/snappy/snappy.gyp +++ b/third_party/snappy/snappy.gyp @@ -31,6 +31,11 @@ ], }, 'variables': { + 'clang_warning_flags': [ + # ComputeTable is unused, + # https://code.google.com/p/snappy/issues/detail?id=96 + '-Wno-unused-function', + ], 'clang_warning_flags_unset': [ # snappy-stubs-internal.h unapologetically has: using namespace std # https://code.google.com/p/snappy/issues/detail?id=70 diff --git a/third_party/sqlite/BUILD.gn b/third_party/sqlite/BUILD.gn index 95b9cb9..866c244 100644 --- a/third_party/sqlite/BUILD.gn +++ b/third_party/sqlite/BUILD.gn @@ -57,17 +57,31 @@ if (!use_system_sqlite) { include_dirs = [ "amalgamation" ] + config("sqlite_warnings") { + cflags = [] + if (is_clang) { + # sqlite contains a few functions that are unused, at least on + # Windows with Chromium's sqlite patches applied + # (interiorCursorEOF fts3EvalDeferredPhrase + # fts3EvalSelectDeferred sqlite3Fts3InitHashTable + # sqlite3Fts3InitTok). + cflags += [ "-Wno-unused-function" ] + } + if (is_linux) { + cflags += [ + # SQLite doesn"t believe in compiler warnings, + # preferring testing. + # http://www.sqlite.org/faq.html#q17 + "-Wno-int-to-pointer-cast", + "-Wno-pointer-to-int-cast", + ] + } + } configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ ":sqlite_warnings" ] if (is_linux) { - cflags += [ - # SQLite doesn"t believe in compiler warnings, - # preferring testing. - # http://www.sqlite.org/faq.html#q17 - "-Wno-int-to-pointer-cast", - "-Wno-pointer-to-int-cast", - ] libs = [ "dl" ] } else if (is_mac || is_ios) { libs = [ "CoreFoundation.framework" ] diff --git a/third_party/sqlite/sqlite.gyp b/third_party/sqlite/sqlite.gyp index bb3a7f5..5fc4dc1 100644 --- a/third_party/sqlite/sqlite.gyp +++ b/third_party/sqlite/sqlite.gyp @@ -117,6 +117,16 @@ 'amalgamation/sqlite3.h', 'amalgamation/sqlite3.c', ], + 'variables': { + 'clang_warning_flags': [ + # sqlite contains a few functions that are unused, at least on + # Windows with Chromium's sqlite patches applied + # (interiorCursorEOF fts3EvalDeferredPhrase + # fts3EvalSelectDeferred sqlite3Fts3InitHashTable + # sqlite3Fts3InitTok). + '-Wno-unused-function', + ], + }, 'include_dirs': [ 'amalgamation', ], diff --git a/third_party/usrsctp/BUILD.gn b/third_party/usrsctp/BUILD.gn index 76e47ca..bbea24b 100644 --- a/third_party/usrsctp/BUILD.gn +++ b/third_party/usrsctp/BUILD.gn @@ -84,9 +84,16 @@ static_library("usrsctp") { # "SCTP_DEBUG", # Uncomment for SCTP debugging. ] + config("usrsctp_warnings") { + if (is_clang) { + # atomic_init in user_atomic.h is a static function in a header. + cflags = [ "-Wno-unused-function" ] + } + } configs -= [ "//build/config/compiler:chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ "//build/config/compiler:no_incompatible_pointer_warnings" ] + configs += [ ":usrsctp_warnings" ] public_configs = [ ":usrsctp_config" ] diff --git a/third_party/usrsctp/usrsctp.gyp b/third_party/usrsctp/usrsctp.gyp index 4f82ff8..b7a044e 100644 --- a/third_party/usrsctp/usrsctp.gyp +++ b/third_party/usrsctp/usrsctp.gyp @@ -120,6 +120,12 @@ 'usrsctplib/user_uma.h', 'usrsctplib/usrsctp.h' ], # sources + 'variables': { + 'clang_warning_flags': [ + # atomic_init in user_atomic.h is a static function in a header. + '-Wno-unused-function', + ], + }, 'conditions': [ ['OS=="linux" or OS=="android"', { 'defines': [ diff --git a/third_party/yasm/BUILD.gn b/third_party/yasm/BUILD.gn index dc6c116..fcb779a 100644 --- a/third_party/yasm/BUILD.gn +++ b/third_party/yasm/BUILD.gn @@ -150,11 +150,17 @@ if (current_toolchain == host_toolchain) { config("re2c_warnings") { # re2c is missing CLOSEVOP from one switch. - if (is_posix || is_clang) { - cflags = [ "-Wno-switch" ] + if (is_clang) { + cflags = [ + # re2c is missing CLOSEVOP from one switch. + "-Wno-switch", + + # re2c contains many static functions in headers (because it's + # a C library predating C99.) + "-Wno-unused-function", + ] } } - configs -= [ "//build/config/compiler:chromium_code" ] configs += [ ":yasm_config", diff --git a/third_party/yasm/yasm.gyp b/third_party/yasm/yasm.gyp index 1f963a3..3db601a 100644 --- a/third_party/yasm/yasm.gyp +++ b/third_party/yasm/yasm.gyp @@ -558,8 +558,13 @@ '-std=gnu99', ], 'variables': { + 'clang_warning_flags': [ # re2c is missing CLOSEVOP from one switch. - 'clang_warning_flags': [ '-Wno-switch' ], + '-Wno-switch', + # re2c contains many static functions in headers (because it's + # a C library predating C99.) + '-Wno-unused-function', + ], }, 'msvs_disabled_warnings': [ 4267 ], }, |