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

Unified Diff: chrome/browser/metrics/metrics_service.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: chrome/browser/metrics/metrics_service.cc
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 79f1a8e7277dc68b68e49f0decf57e0c3d009ea3..9eaa09dc8ec6ae63ffd592f2145ed3ced572f78a 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -777,11 +777,11 @@ std::string MetricsService::GenerateClientID() {
// TODO(cmasone): Once we're comfortable this works, migrate Windows code to
// use this as well.
std::string MetricsService::RandomBytesToGUIDString(const uint64 bytes[2]) {
- return StringPrintf("%08llX-%04llX-%04llX-%04llX-%012llX",
- bytes[0] >> 32,
- (bytes[0] >> 16) & 0x0000ffff,
- bytes[0] & 0x0000ffff,
- bytes[1] >> 48,
+ return StringPrintf("%08X-%04X-%04X-%04X-%012llX",
+ static_cast<unsigned int>(bytes[0] >> 32),
+ static_cast<unsigned int>((bytes[0] >> 16) & 0x0000ffff),
+ static_cast<unsigned int>(bytes[0] & 0x0000ffff),
+ static_cast<unsigned int>(bytes[1] >> 48),
bytes[1] & 0x0000ffffffffffffULL);
}
#endif

Powered by Google App Engine
This is Rietveld 408576698