summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottmg <scottmg@chromium.org>2015-06-30 11:10:29 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-30 18:11:04 +0000
commit838cea57c725da43f9899fee9235fa4fb35bccda (patch)
treebdd06c87cd71b910af69dd5bdeafc1e97ea8e741
parentdcb2830c2eca270550f59e651f793639c7ca8e22 (diff)
downloadchromium_src-838cea57c725da43f9899fee9235fa4fb35bccda.zip
chromium_src-838cea57c725da43f9899fee9235fa4fb35bccda.tar.gz
chromium_src-838cea57c725da43f9899fee9235fa4fb35bccda.tar.bz2
win clang: don't disable -Wself-assign
R=thakis@chromium.org TBR=brettw@chromium.org BUG=505306 Review URL: https://codereview.chromium.org/1218903002 Cr-Commit-Position: refs/heads/master@{#336820}
-rw-r--r--build/common.gypi1
-rw-r--r--build/config/compiler/BUILD.gn1
-rw-r--r--third_party/libpng/BUILD.gn10
-rw-r--r--third_party/libpng/libpng.gyp6
-rw-r--r--third_party/libxml/README.chromium1
-rw-r--r--third_party/libxml/src/xmlschemas.c4
-rw-r--r--third_party/lzma_sdk/BUILD.gn10
-rw-r--r--third_party/lzma_sdk/lzma_sdk.gyp8
8 files changed, 35 insertions, 6 deletions
diff --git a/build/common.gypi b/build/common.gypi
index f9cabb4..2984f0f 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -5719,7 +5719,6 @@
'-Wno-pointer-sign', # http://crbug.com/505303
'-Wno-reorder', # http://crbug.com/505304
'-Wno-return-type-c-linkage', # http://crbug.com/505305
- '-Wno-self-assign', # http://crbug.com/505306
'-Wno-sometimes-uninitialized', # http://crbug.com/505307
'-Wno-switch', # http://crbug.com/505308
'-Wno-unknown-pragmas', # http://crbug.com/505314
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index c586af5..2c0b455 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -818,7 +818,6 @@ if (is_win) {
"-Wno-pointer-sign", # http://crbug.com/505303
"-Wno-reorder", # http://crbug.com/505304
"-Wno-return-type-c-linkage", # http://crbug.com/505305
- "-Wno-self-assign", # http://crbug.com/505306
"-Wno-sometimes-uninitialized", # http://crbug.com/505307
"-Wno-switch", # http://crbug.com/505308
"-Wno-unknown-pragmas", # http://crbug.com/505314
diff --git a/third_party/libpng/BUILD.gn b/third_party/libpng/BUILD.gn
index 787d4fa..056d91d 100644
--- a/third_party/libpng/BUILD.gn
+++ b/third_party/libpng/BUILD.gn
@@ -61,6 +61,16 @@ source_set("libpng_sources") {
public_deps = [
"//third_party/zlib",
]
+
+ # Must be in a config because of how GN orders flags (otherwise -Wall will
+ # appear after this, and turn it back on).
+ config("clang_warnings") {
+ if (is_clang) {
+ # Upstream uses self-assignment to avoid warnings.
+ cflags = [ "-Wno-self-assign" ]
+ }
+ }
+ configs += [ ":clang_warnings" ]
}
if (is_win) {
diff --git a/third_party/libpng/libpng.gyp b/third_party/libpng/libpng.gyp
index ac8fdb4..48b3fa4 100644
--- a/third_party/libpng/libpng.gyp
+++ b/third_party/libpng/libpng.gyp
@@ -9,6 +9,10 @@
'dependencies': [
'../zlib/zlib.gyp:zlib',
],
+ 'variables': {
+ # Upstream uses self-assignment to avoid warnings.
+ 'clang_warning_flags': [ '-Wno-self-assign' ]
+ },
'defines': [
'CHROME_PNG_WRITE_SUPPORT',
'PNG_USER_CONFIG',
@@ -67,7 +71,7 @@
'defines': [
'PNG_USE_DLL',
],
- },
+ },
}],
['OS=="android"', {
'toolsets': ['target', 'host'],
diff --git a/third_party/libxml/README.chromium b/third_party/libxml/README.chromium
index 682c659..1b611f0 100644
--- a/third_party/libxml/README.chromium
+++ b/third_party/libxml/README.chromium
@@ -14,6 +14,7 @@ Modifications:
chromium/include/libxml/libxml_utils.h.
- Import https://git.gnome.org/browse/libxml2/commit/?id=7580ce0a7f53891de520fed2c0e360266c286da6
from upstream.
+- Self-assignment removed https://bugzilla.gnome.org/show_bug.cgi?id=751679.
To import a new snapshot:
diff --git a/third_party/libxml/src/xmlschemas.c b/third_party/libxml/src/xmlschemas.c
index 0657b66..971630e 100644
--- a/third_party/libxml/src/xmlschemas.c
+++ b/third_party/libxml/src/xmlschemas.c
@@ -24201,9 +24201,7 @@ xmlSchemaValidateFacets(xmlSchemaAbstractCtxtPtr actxt,
* anySimpleType based types), then use the provided
* type.
*/
- if (val == NULL)
- valType = valType;
- else
+ if (val != NULL)
valType = xmlSchemaGetValType(val);
ret = 0;
diff --git a/third_party/lzma_sdk/BUILD.gn b/third_party/lzma_sdk/BUILD.gn
index ac31fc1..2afe7b4 100644
--- a/third_party/lzma_sdk/BUILD.gn
+++ b/third_party/lzma_sdk/BUILD.gn
@@ -53,4 +53,14 @@ static_library("lzma_sdk") {
configs += [ "//build/config/compiler:no_chromium_code" ]
public_configs = [ ":lzma_sdk_config" ]
+
+ # Must be in a config because of how GN orders flags (otherwise -Wall will
+ # appear after this, and turn it back on).
+ config("clang_warnings") {
+ if (is_clang) {
+ # Upstream uses self-assignment to avoid warnings.
+ cflags = [ "-Wno-self-assign" ]
+ }
+ }
+ configs += [ ":clang_warnings" ]
}
diff --git a/third_party/lzma_sdk/lzma_sdk.gyp b/third_party/lzma_sdk/lzma_sdk.gyp
index c6fa932..a1167d5 100644
--- a/third_party/lzma_sdk/lzma_sdk.gyp
+++ b/third_party/lzma_sdk/lzma_sdk.gyp
@@ -49,6 +49,10 @@
'_7ZIP_ST',
'_LZMA_PROB32',
],
+ 'variables': {
+ # Upstream uses self-assignment to avoid warnings.
+ 'clang_warning_flags': [ '-Wno-self-assign' ]
+ },
'sources': [
'<@(lzma_sdk_sources)',
],
@@ -72,6 +76,10 @@
'_7ZIP_ST',
'_LZMA_PROB32',
],
+ 'variables': {
+ # Upstream uses self-assignment to avoid warnings.
+ 'clang_warning_flags': [ '-Wno-self-assign' ]
+ },
'include_dirs': [
'.',
],