summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Son <seungha.son@samsung.com>2020-04-10 08:54:15 +0900
committerSeungha Son <seungha.son@samsung.com>2020-04-10 08:58:03 +0900
commit961f4a447c988c412209ec2a02ffeecf977b8eaf (patch)
tree2470855f6ab23cfcc2fb5fde9cfa916744cbbd6b
parentac6ef8f388ce2062621ac639e77a9a3b04ae3402 (diff)
downloadttrace-961f4a447c988c412209ec2a02ffeecf977b8eaf.tar.gz
ttrace-961f4a447c988c412209ec2a02ffeecf977b8eaf.tar.bz2
ttrace-961f4a447c988c412209ec2a02ffeecf977b8eaf.zip
Fix build warning
warning: format '%llx' expects argument of type 'long long unsigned int*', but argument has type 'uint64_t*' {aka 'long unsigned int*'} Change-Id: I7e54040d62d10ebcf2084410bfbbd84310664e07 Signed-off-by: Seungha Son <seungha.son@samsung.com>
-rwxr-xr-xsrc/atrace/atrace.cpp3
-rw-r--r--src/atrace_helper/process_memory_stats.cc2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/atrace/atrace.cpp b/src/atrace/atrace.cpp
index f4a0638..eea8d9b 100755
--- a/src/atrace/atrace.cpp
+++ b/src/atrace/atrace.cpp
@@ -34,6 +34,7 @@
#include <sys/smack.h>
#include <sys/types.h>
#include <unistd.h>
+#include <inttypes.h>
#include <memory>
#include <fstream>
@@ -627,7 +628,7 @@ static bool setUpTrace()
excludedTags |= TTRACE_TAG_ALWAYS;
tags &= ~excludedTags;
}
- printf("Tags: 0x%llx, excludedTags: 0x%llx\n", tags, excludedTags);
+ printf("Tags: 0x%" PRIx64 " excludedTags: 0x%" PRIx64 "\n", tags, excludedTags);
}
ok &= startTrace();
diff --git a/src/atrace_helper/process_memory_stats.cc b/src/atrace_helper/process_memory_stats.cc
index 141c841..366d5d7 100644
--- a/src/atrace_helper/process_memory_stats.cc
+++ b/src/atrace_helper/process_memory_stats.cc
@@ -73,7 +73,7 @@ bool ProcessMemoryStats::ReadFullStats(int pid) {
// Note that the mapped file name ([stack]) is optional and won't be
// present on anonymous memory maps (hence res >= 3 below).
int res = sscanf(line,
- "%llx-%llx %4s %*x %*[:0-9a-f] "
+ "%" PRIx64 "-%" PRIx64 " %4s %*x %*[:0-9a-f] "
"%*[0-9a-f]%*[ \t]%127[^\n]",
&new_mmap->start_addr, &new_mmap->end_addr, new_mmap->prot_flags,
new_mmap->mapped_file);