summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthakis <thakis@chromium.org>2015-12-04 17:11:47 -0800
committerCommit bot <commit-bot@chromium.org>2015-12-05 01:12:35 +0000
commitb10a7ada601a07866d50cd13c6af4605e316152e (patch)
tree6971f877351f00d39ea76c62e760db4826fc28aa
parent7a61e826d13ad9093ff81b6f566baeacd9494254 (diff)
downloadchromium_src-b10a7ada601a07866d50cd13c6af4605e316152e.zip
chromium_src-b10a7ada601a07866d50cd13c6af4605e316152e.tar.gz
chromium_src-b10a7ada601a07866d50cd13c6af4605e316152e.tar.bz2
clang/win: Enable -Wunused-value completely.
BUG=505318 NOTRY=true Review URL: https://codereview.chromium.org/1500783002 Cr-Commit-Position: refs/heads/master@{#363327}
-rw-r--r--build/common.gypi4
-rw-r--r--build/config/compiler/BUILD.gn4
-rw-r--r--chrome/installer/setup/setup_util_unittest.cc2
-rw-r--r--sandbox/win/src/sid.cc2
4 files changed, 2 insertions, 10 deletions
diff --git a/build/common.gypi b/build/common.gypi
index fe6722e..5fbf743 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -5809,10 +5809,6 @@
'-Wno-microsoft-enum-value', # http://crbug.com/505296
'-Wno-unknown-pragmas', # http://crbug.com/505314
'-Wno-microsoft-cast', # http://crbug.com/550065
- # Disable unused-value (crbug.com/505318) except
- # -Wunused-result.
- '-Wno-unused-value',
- '-Wunused-result',
],
},
}],
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 49b3737..a4ff2ed 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -776,10 +776,6 @@ config("default_warnings") {
"-Wno-microsoft-enum-value", # http://crbug.com/505296
"-Wno-unknown-pragmas", # http://crbug.com/505314
"-Wno-microsoft-cast", # http://crbug.com/550065
-
- # Disable unused-value (crbug.com/505318) except -Wunused-result.
- "-Wno-unused-value",
- "-Wunused-result",
]
}
} else {
diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc
index 6107779..d8a5c85 100644
--- a/chrome/installer/setup/setup_util_unittest.cc
+++ b/chrome/installer/setup/setup_util_unittest.cc
@@ -617,7 +617,7 @@ TEST_F(DeleteRegistryKeyPartialTest, NonEmptyKeyWithPreserve) {
{
base::win::RegistryKeyIterator it(root_, path_.c_str());
ASSERT_EQ(to_preserve_.size(), it.SubkeyCount());
- for (it; it.Valid(); ++it) {
+ for (; it.Valid(); ++it) {
ASSERT_NE(to_preserve_.end(),
std::find_if(to_preserve_.begin(), to_preserve_.end(),
[&it](const base::string16& key_name) {
diff --git a/sandbox/win/src/sid.cc b/sandbox/win/src/sid.cc
index 261605d..19c645b 100644
--- a/sandbox/win/src/sid.cc
+++ b/sandbox/win/src/sid.cc
@@ -16,7 +16,7 @@ Sid::Sid(WELL_KNOWN_SID_TYPE type) {
DWORD size_sid = SECURITY_MAX_SID_SIZE;
BOOL result = ::CreateWellKnownSid(type, NULL, sid_, &size_sid);
DCHECK(result);
- DBG_UNREFERENCED_LOCAL_VARIABLE(result);
+ (void)result;
}
const SID *Sid::GetPSID() const {