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

Unified Diff: base/tracked_objects.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/tracked_objects.cc
diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc
index 1e7d293a3d78d879c719edfd213302f82f811f58..0d687037c236102e9685ca1069d13619ddb9ef93 100644
--- a/base/tracked_objects.cc
+++ b/base/tracked_objects.cc
@@ -6,6 +6,7 @@
#include <math.h>
+#include "base/format_macros.h"
#include "base/message_loop.h"
#include "base/string_util.h"
@@ -551,22 +552,23 @@ void Aggregation::Write(std::string* output) const {
if (locations_.size() == 1) {
locations_.begin()->first.Write(true, true, output);
} else {
- StringAppendF(output, "%d Locations. ", locations_.size());
+ StringAppendF(output, "%" PRIuS " Locations. ", locations_.size());
if (birth_files_.size() > 1)
- StringAppendF(output, "%d Files. ", birth_files_.size());
+ StringAppendF(output, "%" PRIuS " Files. ", birth_files_.size());
else
StringAppendF(output, "All born in %s. ",
birth_files_.begin()->first.c_str());
}
if (birth_threads_.size() > 1)
- StringAppendF(output, "%d BirthingThreads. ", birth_threads_.size());
+ StringAppendF(output, "%" PRIuS " BirthingThreads. ",
+ birth_threads_.size());
else
StringAppendF(output, "All born on %s. ",
birth_threads_.begin()->first->ThreadName().c_str());
if (death_threads_.size() > 1) {
- StringAppendF(output, "%d DeathThreads. ", death_threads_.size());
+ StringAppendF(output, "%" PRIuS " DeathThreads. ", death_threads_.size());
} else {
if (death_threads_.begin()->first)
StringAppendF(output, "All deleted on %s. ",

Powered by Google App Engine
This is Rietveld 408576698