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/debug/trace_event_win.cc | |
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/debug/trace_event_win.cc')
-rw-r--r-- | base/debug/trace_event_win.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/base/debug/trace_event_win.cc b/base/debug/trace_event_win.cc index 686ade3..99dd242 100644 --- a/base/debug/trace_event_win.cc +++ b/base/debug/trace_event_win.cc @@ -106,9 +106,9 @@ void TraceEventETWProvider::Trace(const char* name, TraceEventETWProvider* provider = TraceEventETWProvider::GetInstance(); if (provider && provider->IsTracing()) { // Compute the name & extra lengths if not supplied already. - if (name_len == -1) + if (name_len == kUseStrlen) name_len = (name == NULL) ? 0 : strlen(name); - if (extra_len == -1) + if (extra_len == kUseStrlen) extra_len = (extra == NULL) ? 0 : strlen(extra); provider->TraceEvent(name, name_len, type, id, extra, extra_len); |