diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-20 06:53:28 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-20 06:53:28 +0000 |
commit | 34b2b007db875a6acb853c5cd2a247fbb32c0f88 (patch) | |
tree | 6dc39bc9f10d6e8eedcdf14821ba9e96b5ccab51 /base/trace_event.cc | |
parent | 24b857793e27aded8d804a112a5fe6c77e28b081 (diff) | |
download | chromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.zip chromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.tar.gz chromium_src-34b2b007db875a6acb853c5cd2a247fbb32c0f88.tar.bz2 |
Add compiler-specific "examine printf format" attributes to printfs.
Functions that take a printf-style format get a new annotation, which
produces a bunch of compiler warnings when you use printf impoperly.
This change adds the annotations and fixes the warnings.
We now must use PRId64 for 64-bit numbers and the PRIsz for size_t.
Review URL: http://codereview.chromium.org/339059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/trace_event.cc')
-rw-r--r-- | base/trace_event.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/base/trace_event.cc b/base/trace_event.cc index be2fbaa..13c0c2c 100644 --- a/base/trace_event.cc +++ b/base/trace_event.cc @@ -133,10 +133,10 @@ void TraceLog::Trace(const std::string& name, int64 usec = delta.InMicroseconds(); std::string msg = StringPrintf("{'pid':'0x%lx', 'tid':'0x%lx', 'type':'%s', " - "'name':'%s', 'id':'0x%lx', 'extra':'%s', 'file':'%s', " + "'name':'%s', 'id':'%p', 'extra':'%s', 'file':'%s', " "'line_number':'%d', 'usec_begin': %" PRId64 "},\n", - base::GetCurrentProcId(), - PlatformThread::CurrentId(), + static_cast<unsigned long>(base::GetCurrentProcId()), + static_cast<unsigned long>(PlatformThread::CurrentId()), kEventTypeNames[type], name.c_str(), id, |