[compiler-rt] c9680bc - [compiler-rt] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 23:31:02 PDT 2024
Author: Kazu Hirata
Date: 2024-07-11T23:30:55-07:00
New Revision: c9680bcdc537eeaf09b886107804460905188cd9
URL: https://github.com/llvm/llvm-project/commit/c9680bcdc537eeaf09b886107804460905188cd9
DIFF: https://github.com/llvm/llvm-project/commit/c9680bcdc537eeaf09b886107804460905188cd9.diff
LOG: [compiler-rt] Fix a warning
This patch fixes:
compiler-rt/lib/hwasan/hwasan_report.cpp:331:57: error: format
specifies type 'void *' but the argument has type 'const uptr *'
(aka 'const unsigned long *') [-Werror,-Wformat-pedantic]
Added:
Modified:
compiler-rt/lib/hwasan/hwasan_report.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/hwasan/hwasan_report.cpp b/compiler-rt/lib/hwasan/hwasan_report.cpp
index 503784b6c4532..bc66e6e805c91 100644
--- a/compiler-rt/lib/hwasan/hwasan_report.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_report.cpp
@@ -328,7 +328,8 @@ static void PrintStackAllocations(const StackAllocationsRingBuffer *sa,
break;
uptr pc_mask = (1ULL << 48) - 1;
uptr pc = record & pc_mask;
- frame_desc.AppendF(" record_addr:%p record:0x%zx", record_addr, record);
+ frame_desc.AppendF(" record_addr:%p record:0x%zx",
+ reinterpret_cast<const void *>(record_addr), record);
SymbolizedStackHolder symbolized_stack(
Symbolizer::GetOrInit()->SymbolizePC(pc));
const SymbolizedStack *frame = symbolized_stack.get();
More information about the llvm-commits
mailing list