forked from OSchip/llvm-project
[profile] Fifth speculative fix for Android after D68351
Use the printf macros from inttypes.h to sidestep -Wformat issues: /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:425:14: error: format specifies type 'long long' but the argument has type 'off_t' (aka 'long') [-Werror,-Wformat] CurrentFileOffset, PageSize); ^~~~~~~~~~~~~~~~~ /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR' fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__); ~~~~~~ ^~~~~~~~~~~ /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:461:41: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat] strerror(errno), CountersBegin, PageAlignedCountersLength, Fileno, ^~~~~~~~~~~~~~~~~~~~~~~~~ /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR' fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__); ~~~~~~ ^~~~~~~~~~~ /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:462:9: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat] FileOffsetToCounters); ^~~~~~~~~~~~~~~~~~~~ /var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR' fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__);
This commit is contained in:
parent
92a25fbf11
commit
197bad5089
|
@ -426,8 +426,8 @@ static void initializeProfileForContinuousMode(void) {
|
|||
off_t OffsetModPage = CurrentFileOffset % PageSize;
|
||||
if (OffsetModPage != 0) {
|
||||
PROF_ERR("Continuous counter sync mode is enabled, but raw profile is not"
|
||||
"page-aligned. CurrentFileOffset = %lld, pagesz = %u.\n",
|
||||
CurrentFileOffset, PageSize);
|
||||
"page-aligned. CurrentFileOffset = %" PRIu64 ", pagesz = %u.\n",
|
||||
(uint64_t) CurrentFileOffset, PageSize);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -460,9 +460,9 @@ static void initializeProfileForContinuousMode(void) {
|
|||
PROF_ERR(
|
||||
"Continuous counter sync mode is enabled, but mmap() failed (%s).\n"
|
||||
" - CountersBegin: %p\n"
|
||||
" - PageAlignedCountersLength: %llu\n"
|
||||
" - PageAlignedCountersLength: %" PRIu64 "\n"
|
||||
" - Fileno: %d\n"
|
||||
" - FileOffsetToCounters: %llu\n",
|
||||
" - FileOffsetToCounters: %" PRIu64 "\n",
|
||||
strerror(errno), CountersBegin, PageAlignedCountersLength, Fileno,
|
||||
FileOffsetToCounters);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue