diff options
author | ccameron <ccameron@chromium.org> | 2015-07-27 18:06:12 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-28 01:07:10 +0000 |
commit | 4bf2ca554347fc20e1649e5ff4cf700d9fbd713a (patch) | |
tree | b582809e966c8d13a3f55cbc2f0c708ebb240d4e | |
parent | 3e4cf54491803eb102c4887f1de5ccd088c612b1 (diff) | |
download | chromium_src-4bf2ca554347fc20e1649e5ff4cf700d9fbd713a.zip chromium_src-4bf2ca554347fc20e1649e5ff4cf700d9fbd713a.tar.gz chromium_src-4bf2ca554347fc20e1649e5ff4cf700d9fbd713a.tar.bz2 |
Revert of Enable C4018 globally for the GN build, and disable per-target. (patchset #4 id:60001 of https://codereview.chromium.org/1246103007/)
Reason for revert:
Speculative revert based on windows gn bots failing with
http://build.chromium.org/p/chromium.win/builders/Win8%20GN%20%28dbg%29/builds/10113
FAILED: ninja -t msvc -e environment.x64 -- E:\b\build\goma/gomacc.exe "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64/cl.exe" /nologo /showIncludes /FC @obj/base/base/precompile.c.obj.rsp /c ../../build/precompile.cc /Foobj/base/base/precompile.c.obj /Fdobj/base/base_c.pdb
e:\b\build\slave\win_x64_gn__dbg_\build\src\build\precompile.cc(8) : error C2220: warning treated as error - no 'object' file generated
e:\b\build\slave\win_x64_gn__dbg_\build\src\build\precompile.cc(8) : warning C4206: nonstandard extension used : translation unit is empty
ninja: build stopped: subcommand failed.
In theory this warning shouldn't have affected other warnings, but there are no other clear candidates.
Original issue's description:
> Enable C4018 globally for the GN build, and disable per-target.
>
> This matches what the GYP build does.
>
> BUG=398202
> TEST=none
>
> Committed: https://crrev.com/d408e1965f8e03629738039289ab7779c42a318c
> Cr-Commit-Position: refs/heads/master@{#340590}
TBR=brettw@chromium.org,erg@chromium.org,pkasting@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=398202
Review URL: https://codereview.chromium.org/1257583007
Cr-Commit-Position: refs/heads/master@{#340623}
-rw-r--r-- | build/config/compiler/BUILD.gn | 5 | ||||
-rw-r--r-- | components/filesystem/file_impl.cc | 2 | ||||
-rw-r--r-- | third_party/leveldatabase/BUILD.gn | 4 | ||||
-rw-r--r-- | third_party/libexif/BUILD.gn | 2 | ||||
-rw-r--r-- | third_party/libxml/BUILD.gn | 5 | ||||
-rw-r--r-- | third_party/mesa/BUILD.gn | 2 | ||||
-rw-r--r-- | third_party/protobuf/BUILD.gn | 10 | ||||
-rw-r--r-- | third_party/qcms/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/re2/BUILD.gn | 5 | ||||
-rw-r--r-- | third_party/snappy/BUILD.gn | 4 |
10 files changed, 14 insertions, 26 deletions
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 86d1586..4cc958c 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -717,6 +717,11 @@ if (is_win) { # Warnings permanently disabled: + # TODO(GYP) The GYP build doesn't have this globally enabled but disabled + # for a bunch of individual targets. Re-enable this globally when those + # targets are fixed. + "/wd4018", # Comparing signed and unsigned values. + # C4127: conditional expression is constant # This warning can in theory catch dead code and other problems, but # triggers in far too many desirable cases where the conditional diff --git a/components/filesystem/file_impl.cc b/components/filesystem/file_impl.cc index 4925f9a..2539498 100644 --- a/components/filesystem/file_impl.cc +++ b/components/filesystem/file_impl.cc @@ -102,7 +102,7 @@ void FileImpl::Write(mojo::Array<uint8_t> bytes_to_write, // actually wrote that much). if (bytes_to_write.size() > #if defined(OS_WIN) - static_cast<size_t>(std::numeric_limits<int>::max())) { + std::numeric_limits<INT>::max()) { #else static_cast<size_t>(std::numeric_limits<ssize_t>::max())) { #endif diff --git a/third_party/leveldatabase/BUILD.gn b/third_party/leveldatabase/BUILD.gn index b3080d8..c29f0f8 100644 --- a/third_party/leveldatabase/BUILD.gn +++ b/third_party/leveldatabase/BUILD.gn @@ -113,10 +113,6 @@ static_library("leveldatabase") { "//third_party/re2", "//third_party/snappy", ] - - if (is_win) { - cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. - } } if (!is_android) { diff --git a/third_party/libexif/BUILD.gn b/third_party/libexif/BUILD.gn index 8eba113..5a464e6 100644 --- a/third_party/libexif/BUILD.gn +++ b/third_party/libexif/BUILD.gn @@ -60,7 +60,7 @@ if (!is_linux || is_chromeos) { ldflags = [ "/DEF:" + rebase_path("libexif.def") ] - cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. + cflags = [ "/wd4018" ] # size/unsigned mismatch # TODO(GYP): Handle /analyze switch, when it will be used in GN. } else if (is_linux) { diff --git a/third_party/libxml/BUILD.gn b/third_party/libxml/BUILD.gn index 58a5f1c..1f10dee 100644 --- a/third_party/libxml/BUILD.gn +++ b/third_party/libxml/BUILD.gn @@ -155,10 +155,7 @@ static_library("libxml") { ] if (is_win) { - cflags_c = [ - "/wd4018", # Signed/unsigned mismatch in comparison. - "/wd4101", # Unreferenced local variable. - ] + cflags_c = [ "/wd4101" ] # Unreferenced local variable. } else if (is_mac || is_ios || is_android) { # http://www.xmlsoft.org/threads.html says that this is required when using # libxml from several threads, which can possibly happen in chrome. On diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn index 62f8611..96f5ec0 100644 --- a/third_party/mesa/BUILD.gn +++ b/third_party/mesa/BUILD.gn @@ -125,7 +125,6 @@ config("mesa_internal_warnings") { cflags += [ "-Wno-tautological-constant-out-of-range-compare", "-Wno-mismatched-tags", # Fixed upstream. - # mesa's STATIC_ASSERT() macro expands to an ununused typedef. "-Wno-unused-local-typedef", ] @@ -135,7 +134,6 @@ config("mesa_internal_warnings") { # Mesa is ever rolled and the warnings are fixed. cflags += [ "/wd4005", # Macro defined twice. - "/wd4018", # Signed/unsigned mismatch in comparison. "/wd4065", # Switch statement contains 'default' but no 'case' labels. "/wd4090", # 'Operation' : different 'modifier' qualifiers "/wd4099", # Type name struct-vs-class doesn't match. diff --git a/third_party/protobuf/BUILD.gn b/third_party/protobuf/BUILD.gn index 7d42a00d..0c57bd6 100644 --- a/third_party/protobuf/BUILD.gn +++ b/third_party/protobuf/BUILD.gn @@ -77,11 +77,11 @@ protobuf_lite_sources = [ protobuf_lite_cflags = [] if (is_win) { protobuf_lite_cflags = [ - "/wd4018", # Signed/unsigned mismatch in comparison. - "/wd4244", # Implicit conversion, possible loss of data. - "/wd4355", # 'this' used in base member initializer list. - "/wd4267", # Size_t to int truncation. - "/wd4291", # No matching operator delete for a placement new. + "/wd4018", # signed/unsigned mismatch in comparison + "/wd4244", # implicit conversion, possible loss of data + "/wd4355", # 'this' used in base member initializer list + "/wd4267", # size_t to int truncation + "/wd4291", # no matching operator delete for a placement new ] } diff --git a/third_party/qcms/BUILD.gn b/third_party/qcms/BUILD.gn index a4b60d3..5e27d44 100644 --- a/third_party/qcms/BUILD.gn +++ b/third_party/qcms/BUILD.gn @@ -32,7 +32,6 @@ source_set("qcms") { if (is_win) { cflags = [ - "/wd4018", # Signed/unsigned mismatch in comparison. "/wd4056", # Overflow in floating-point constant arithmetic (INFINITY). "/wd4756", # Overflow in constant arithmetic (INFINITY). ] diff --git a/third_party/re2/BUILD.gn b/third_party/re2/BUILD.gn index ca1f7a2..2bc130a 100644 --- a/third_party/re2/BUILD.gn +++ b/third_party/re2/BUILD.gn @@ -67,10 +67,7 @@ static_library("re2") { if (is_win) { include_dirs = [ "mswin" ] - cflags = [ - "/wd4018", # Signed/unsigned mismatch in comparison. - "/wd4722", # Destructor never terminates. - ] + cflags = [ "/wd4722" ] # Destructor never terminates. } else { sources -= [ "mswin/stdint.h" ] } diff --git a/third_party/snappy/BUILD.gn b/third_party/snappy/BUILD.gn index e8de575..4af0e81 100644 --- a/third_party/snappy/BUILD.gn +++ b/third_party/snappy/BUILD.gn @@ -31,10 +31,6 @@ static_library("snappy") { configs += [ "//build/config/compiler:no_chromium_code" ] public_configs = [ ":snappy_config" ] - if (is_win) { - cflags = [ "/wd4018" ] # Signed/unsigned mismatch in comparison. - } - if (is_clang) { # snappy-stubs-internal.h unapologetically has: using namespace std # https://code.google.com/p/snappy/issues/detail?id=70 |