[build] Remove global -Wno-deprecated-non-prototype
Fix an instance in libevent.
Sink -Wno-deprecated-non-prototype into zlib, it's the only remaining library where this warning fires. (upstream bug https://github.com/madler/zlib/issues/633)
Bug: 1314867
Change-Id: I2547ba1b358ab90ec6dece4f0879b2ebe6f59820
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3615937
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Arthur Eubanks <aeubanks@google.com>
Cr-Commit-Position: refs/heads/main@{#998593}
NOKEYCHECK=True
GitOrigin-RevId: cbba1d4d16d3dfeb51421749cafa34c2666f8b26
diff --git a/BUILD.gn b/BUILD.gn
index 3a71693..999b1de 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -197,6 +197,7 @@
# style function declarations, which triggers warning C4131.
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [ ":zlib_warnings" ]
public_configs = [ ":zlib_inflate_chunk_simd_config" ]
@@ -263,8 +264,11 @@
}
config("zlib_warnings") {
- if (is_clang && use_x86_x64_optimizations) {
- cflags = [ "-Wno-incompatible-pointer-types" ]
+ if (is_clang) {
+ cflags = [ "-Wno-deprecated-non-prototype" ]
+ if (use_x86_x64_optimizations) {
+ cflags += [ "-Wno-incompatible-pointer-types" ]
+ }
}
}
@@ -367,8 +371,11 @@
visibility = [ ":*" ]
if (is_clang) {
- # zlib uses `if ((a == b))` for some reason.
- cflags = [ "-Wno-parentheses-equality" ]
+ cflags = [
+ # zlib uses `if ((a == b))` for some reason.
+ "-Wno-parentheses-equality",
+ "-Wno-deprecated-non-prototype",
+ ]
}
}
@@ -432,7 +439,11 @@
sources = [ "contrib/minizip/minizip.c" ]
if (is_clang) {
- cflags = [ "-Wno-incompatible-pointer-types-discards-qualifiers" ]
+ cflags = [
+ "-Wno-incompatible-pointer-types-discards-qualifiers",
+
+ "-Wno-deprecated-non-prototype",
+ ]
}
if (!is_debug) {
@@ -452,7 +463,10 @@
sources = [ "contrib/minizip/miniunz.c" ]
if (is_clang) {
- cflags = [ "-Wno-incompatible-pointer-types-discards-qualifiers" ]
+ cflags = [
+ "-Wno-incompatible-pointer-types-discards-qualifiers",
+ "-Wno-deprecated-non-prototype",
+ ]
}
if (!is_debug) {