From 9460c33b35c889740a3dc659eb9c9d1161fd155d Mon Sep 17 00:00:00 2001 From: tnagel Date: Wed, 17 Jun 2015 05:09:25 -0700 Subject: [PATCH] Fix GCC warning in heap-profile-table.cc. The current code throws the following warning: ../../third_party/tcmalloc/chromium/src/heap-profile-table.cc:522:42: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'const void*' [-Wformat=] BUG=None Review URL: https://codereview.chromium.org/1180903010 Cr-Commit-Position: refs/heads/master@{#334813} --- third_party/tcmalloc/chromium/src/heap-profile-table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/tcmalloc/chromium/src/heap-profile-table.cc b/third_party/tcmalloc/chromium/src/heap-profile-table.cc index d880e562bda4..1e0eea5e115b 100644 --- a/third_party/tcmalloc/chromium/src/heap-profile-table.cc +++ b/third_party/tcmalloc/chromium/src/heap-profile-table.cc @@ -519,7 +519,7 @@ void HeapProfileTable::DumpMarkedIterator(const void* ptr, AllocValue* v, b.depth = v->bucket()->depth; b.stack = v->bucket()->stack; char addr[16]; - snprintf(addr, 16, "0x%08" PRIxPTR, ptr); + snprintf(addr, 16, "0x%08" PRIxPTR, reinterpret_cast(ptr)); char buf[1024]; int len = UnparseBucket(b, buf, 0, sizeof(buf), addr, NULL); RawWrite(args.fd, buf, len); -- 2.11.4.GIT