Index: compiler-rt/CMakeLists.txt =================================================================== --- compiler-rt/CMakeLists.txt +++ compiler-rt/CMakeLists.txt @@ -443,7 +443,6 @@ append_list_if(COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG -Wno-variadic-macros SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG -Wno-c99-extensions SANITIZER_COMMON_CFLAGS) # format-pedantic warns about passing T* for %p, which is not useful. -append_list_if(COMPILER_RT_HAS_WNO_FORMAT_PEDANTIC -Wno-format-pedantic SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4146_FLAG /wd4146 SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4291_FLAG /wd4291 SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_WD4391_FLAG /wd4391 SANITIZER_COMMON_CFLAGS) Index: compiler-rt/lib/asan/asan_errors.cpp =================================================================== --- compiler-rt/lib/asan/asan_errors.cpp +++ compiler-rt/lib/asan/asan_errors.cpp @@ -538,7 +538,8 @@ static void PrintShadowBytes(InternalScopedString *str, const char *before, u8 *bytes, u8 *guilty, uptr n) { Decorator d; - if (before) str->append("%s%p:", before, bytes); + if (before) + str->append("%s%p:", before, (void *)bytes); for (uptr i = 0; i < n; i++) { u8 *p = bytes + i; const char *before = Index: compiler-rt/lib/asan/asan_fake_stack.cpp =================================================================== --- compiler-rt/lib/asan/asan_fake_stack.cpp +++ compiler-rt/lib/asan/asan_fake_stack.cpp @@ -54,10 +54,11 @@ : MmapOrDie(size, "FakeStack")); res->stack_size_log_ = stack_size_log; u8 *p = reinterpret_cast(res); - VReport(1, "T%d: FakeStack created: %p -- %p stack_size_log: %zd; " + VReport(1, + "T%d: FakeStack created: %p -- %p stack_size_log: %zd; " "mmapped %zdK, noreserve=%d \n", - GetCurrentTidOrInvalid(), p, - p + FakeStack::RequiredSize(stack_size_log), stack_size_log, + GetCurrentTidOrInvalid(), (void *)p, + (void *)(p + FakeStack::RequiredSize(stack_size_log)), stack_size_log, size >> 10, flags()->uar_noreserve); return res; } Index: compiler-rt/lib/asan/asan_globals.cpp =================================================================== --- compiler-rt/lib/asan/asan_globals.cpp +++ compiler-rt/lib/asan/asan_globals.cpp @@ -89,8 +89,8 @@ g.module_name, g.has_dynamic_init, (void *)g.odr_indicator); if (g.location) { Report(" location (%p): name=%s[%p], %d %d\n", (void *)g.location, - g.location->filename, g.location->filename, g.location->line_no, - g.location->column_no); + g.location->filename, (void *)g.location->filename, + g.location->line_no, g.location->column_no); } } Index: compiler-rt/lib/cfi/cfi.cpp =================================================================== --- compiler-rt/lib/cfi/cfi.cpp +++ compiler-rt/lib/cfi/cfi.cpp @@ -359,7 +359,7 @@ return; } CFICheckFn cfi_check = sv.get_cfi_check(); - VReport(2, "__cfi_check at %p\n", cfi_check); + VReport(2, "__cfi_check at %p\n", (void *)cfi_check); cfi_check(CallSiteTypeId, Ptr, DiagData); } Index: compiler-rt/lib/dfsan/dfsan.cpp =================================================================== --- compiler-rt/lib/dfsan/dfsan.cpp +++ compiler-rt/lib/dfsan/dfsan.cpp @@ -916,7 +916,7 @@ // Consider refactoring these into a shared implementation. bool InitShadow(bool init_origins) { // Let user know mapping parameters first. - VPrintf(1, "dfsan_init %p\n", &__dfsan::dfsan_init); + VPrintf(1, "dfsan_init %p\n", (void *)&__dfsan::dfsan_init); for (unsigned i = 0; i < kMemoryLayoutSize; ++i) VPrintf(1, "%s: %zx - %zx\n", kMemoryLayout[i].name, kMemoryLayout[i].start, kMemoryLayout[i].end - 1); Index: compiler-rt/lib/hwasan/hwasan_report.cpp =================================================================== --- compiler-rt/lib/hwasan/hwasan_report.cpp +++ compiler-rt/lib/hwasan/hwasan_report.cpp @@ -518,7 +518,7 @@ InternalScopedString s; for (tag_t *row = beg_row; row < end_row; row += row_len) { s.append("%s", row == center_row_beg ? "=>" : " "); - s.append("%p:", row); + s.append("%p:", (void *)row); for (uptr i = 0; i < row_len; i++) { s.append("%s", row + i == tag_ptr ? "[" : " "); print_tag(s, &row[i]); Index: compiler-rt/lib/hwasan/hwasan_thread.cpp =================================================================== --- compiler-rt/lib/hwasan/hwasan_thread.cpp +++ compiler-rt/lib/hwasan/hwasan_thread.cpp @@ -108,10 +108,9 @@ } void Thread::Print(const char *Prefix) { - Printf("%sT%zd %p stack: [%p,%p) sz: %zd tls: [%p,%p)\n", Prefix, - unique_id_, this, stack_bottom(), stack_top(), - stack_top() - stack_bottom(), - tls_begin(), tls_end()); + Printf("%sT%zd %p stack: [%p,%p) sz: %zd tls: [%p,%p)\n", Prefix, unique_id_, + (void *)this, stack_bottom(), stack_top(), + stack_top() - stack_bottom(), tls_begin(), tls_end()); } static u32 xorshift(u32 state) { Index: compiler-rt/lib/memprof/memprof_thread.cpp =================================================================== --- compiler-rt/lib/memprof/memprof_thread.cpp +++ compiler-rt/lib/memprof/memprof_thread.cpp @@ -131,7 +131,7 @@ int local = 0; VReport(1, "T%d: stack [%p,%p) size 0x%zx; local=%p\n", tid(), (void *)stack_bottom_, (void *)stack_top_, stack_top_ - stack_bottom_, - &local); + (void *)&local); } thread_return_t @@ -198,7 +198,7 @@ void SetCurrentThread(MemprofThread *t) { CHECK(t->context()); - VReport(2, "SetCurrentThread: %p for thread %p\n", t->context(), + VReport(2, "SetCurrentThread: %p for thread %p\n", (void *)t->context(), (void *)GetThreadSelf()); // Make sure we do not reset the current MemprofThread. CHECK_EQ(0, TSDGet()); Index: compiler-rt/lib/msan/msan.cpp =================================================================== --- compiler-rt/lib/msan/msan.cpp +++ compiler-rt/lib/msan/msan.cpp @@ -515,7 +515,7 @@ } unsigned char *s = (unsigned char*)MEM_TO_SHADOW(x); - Printf("%p[%p] ", s, x); + Printf("%p[%p] ", (void *)s, x); for (uptr i = 0; i < size; i++) Printf("%x%x ", s[i] >> 4, s[i] & 0xf); Printf("\n"); Index: compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp =================================================================== --- compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp +++ compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp @@ -198,7 +198,8 @@ } break; default: - Report("Unsupported specifier in stack frame format: %c (%p)!\n", *p, p); + Report("Unsupported specifier in stack frame format: %c (%p)!\n", *p, + (void *)p); Die(); } } @@ -250,7 +251,7 @@ break; default: Report("Unsupported specifier in stack frame format: %c (%p)!\n", *p, - p); + (void *)p); Die(); } } Index: compiler-rt/lib/xray/xray_x86_64.cpp =================================================================== --- compiler-rt/lib/xray/xray_x86_64.cpp +++ compiler-rt/lib/xray/xray_x86_64.cpp @@ -148,8 +148,8 @@ int64_t TrampolineOffset = reinterpret_cast(Trampoline) - (static_cast(Address) + 11); if (TrampolineOffset < MinOffset || TrampolineOffset > MaxOffset) { - Report("XRay Entry trampoline (%p) too far from sled (%p)\n", Trampoline, - reinterpret_cast(Address)); + Report("XRay Entry trampoline (%p) too far from sled (%p)\n", + (void *)Trampoline, reinterpret_cast(Address)); return false; } if (Enable) { @@ -195,7 +195,7 @@ (static_cast(Address) + 11); if (TrampolineOffset < MinOffset || TrampolineOffset > MaxOffset) { Report("XRay Exit trampoline (%p) too far from sled (%p)\n", - __xray_FunctionExit, reinterpret_cast(Address)); + (void *)__xray_FunctionExit, reinterpret_cast(Address)); return false; } if (Enable) { @@ -224,7 +224,7 @@ (static_cast(Address) + 11); if (TrampolineOffset < MinOffset || TrampolineOffset > MaxOffset) { Report("XRay Tail Exit trampoline (%p) too far from sled (%p)\n", - __xray_FunctionTailExit, reinterpret_cast(Address)); + (void *)__xray_FunctionTailExit, reinterpret_cast(Address)); return false; } if (Enable) {