From 813876c510166b651e9a61b10ef78908ba9b9f0a Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Wed, 9 Mar 2016 18:20:38 +0100 Subject: [PATCH] Fix compile warnings on 32bit machines --- heaptrack_interpret.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/heaptrack_interpret.cpp b/heaptrack_interpret.cpp index 75857e3..942b3bf 100644 --- a/heaptrack_interpret.cpp +++ b/heaptrack_interpret.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -385,7 +386,7 @@ int main(int /*argc*/, char** /*argv*/) AllocationIndex index; if (allocationInfos.add(size, traceId, &index)) { - fprintf(stdout, "a %zx %x\n", size, traceId.index); + fprintf(stdout, "a %" PRIx64 " %x\n", size, traceId.index); } ptrToIndex.addPointer(ptr, index); lastPtr = ptr; @@ -417,9 +418,9 @@ int main(int /*argc*/, char** /*argv*/) } fprintf(stderr, "heaptrack stats:\n" - "\tallocations: \t%lu\n" - "\tleaked allocations: \t%lu\n" - "\ttemporary allocations:\t%lu\n", + "\tallocations: \t%" PRIu64 "\n" + "\tleaked allocations: \t%" PRIu64 "\n" + "\ttemporary allocations:\t%" PRIu64 "\n", allocations, leakedAllocations, temporaryAllocations); return 0; -- 2.7.4