diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-03 07:03:39 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-03 07:03:39 +0000 |
commit | ed8e57da499e4ad0398f78696c3b2dfaa66ceaba (patch) | |
tree | eb8d06a0dc4d45d7aedf8822d62711e49f9acb9a /base/metrics | |
parent | 7a70d2211a276c2b675d07319d1393b43059f8f6 (diff) | |
download | chromium_src-ed8e57da499e4ad0398f78696c3b2dfaa66ceaba.zip chromium_src-ed8e57da499e4ad0398f78696c3b2dfaa66ceaba.tar.gz chromium_src-ed8e57da499e4ad0398f78696c3b2dfaa66ceaba.tar.bz2 |
Fixes for re-enabling more MSVC level 4 warnings: base/ edition
This contains fixes for the following sorts of issues:
* Signedness mismatch
* Assignment inside conditional
* Nonstandard extension: unnamed struct/union
* Octal escape sequence terminated by decimal number
* Possibly-uninitialized local variable
This also contains a very small number of other cleanups/simplifications to
nearby code.
BUG=81439
TEST=none
Review URL: https://codereview.chromium.org/368133002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281204 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/metrics')
-rw-r--r-- | base/metrics/stats_table.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/metrics/stats_table.cc b/base/metrics/stats_table.cc index 03158fd..0986395 100644 --- a/base/metrics/stats_table.cc +++ b/base/metrics/stats_table.cc @@ -478,7 +478,9 @@ int* StatsTable::FindLocation(const char* name) { // Get the slot for this thread. Try to register // it if none exists. int slot = table->GetSlot(); - if (!slot && !(slot = table->RegisterThread(std::string()))) + if (!slot) + slot = table->RegisterThread(std::string()); + if (!slot) return NULL; // Find the counter id for the counter. |