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

Unified Diff: base/debug/stack_trace_android.cc

Issue 185423006: Eliminate build warnings in base/ for Android x64 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: rebase Created 6 years, 9 months 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
« no previous file with comments | « base/debug/proc_maps_linux.cc ('k') | base/os_compat_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace_android.cc
===================================================================
--- base/debug/stack_trace_android.cc (revision 257841)
+++ base/debug/stack_trace_android.cc (working copy)
@@ -11,6 +11,12 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_restrictions.h"
+#ifdef __LP64__
+#define FMT_ADDR "0x%016lx"
+#else
+#define FMT_ADDR "0x%08x"
+#endif
+
namespace {
struct StackCrawlState {
@@ -104,12 +110,12 @@
++iter;
}
- *os << base::StringPrintf("#%02d 0x%08x ", i, address);
+ *os << base::StringPrintf("#%02zd " FMT_ADDR " ", i, address);
if (iter != regions.end()) {
uintptr_t rel_pc = address - iter->start + iter->offset;
const char* path = iter->path.c_str();
- *os << base::StringPrintf("%s+0x%08x", path, rel_pc);
+ *os << base::StringPrintf("%s+" FMT_ADDR, path, rel_pc);
} else {
*os << "<unknown>";
}
« no previous file with comments | « base/debug/proc_maps_linux.cc ('k') | base/os_compat_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698