OpenSSL: Disable specific warnings when using clang.
Fix disabling of all warnings when using gcc ('copts' is a noop).
Review URL: https://chromiumcodereview.appspot.com/9959115
git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/openssl@130472 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/openssl.gyp b/openssl.gyp
index 96a2b89..c9bf79f 100644
--- a/openssl.gyp
+++ b/openssl.gyp
@@ -16,11 +16,6 @@
# We do not use TLS over UDP on Chromium so far.
'OPENSSL_NO_DTLS1',
],
- 'copts': [
- '-w',
- '-Wno-cast-qual',
- '-Wno-error',
- ],
'sources': [
'openssl/ssl/bio_ssl.c',
'openssl/ssl/d1_both.c',
@@ -659,6 +654,19 @@
['exclude', 'mdc2/.*$'],
],
}],
+ ['clang==1', {
+ 'cflags': [
+ # OpenSSL has a few |if ((foo == NULL))| checks.
+ '-Wno-parentheses-equality',
+ # OpenSSL uses several function-style macros and then ignores the
+ # returned value.
+ '-Wno-unused-value',
+ ],
+ }, { # Not clang. Disable all warnings.
+ 'cflags': [
+ '-w',
+ ],
+ }]
],
'include_dirs': [
'.',