Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Unified Diff: base/trace_event.cc

Issue 339059: Add compiler-specific "examine printf format" attributes to printfs. (Closed)
Patch Set: cleanups Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/trace_event.cc
diff --git a/base/trace_event.cc b/base/trace_event.cc
index be2fbaa4fcd9584a663a0f393c1c522fb21ddaea..13c0c2cd82213df237a8801f65240c60a437f098 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,

Powered by Google App Engine
This is Rietveld 408576698