[compiler-rt] 81c4843 - [~NFC] Fix printf() type punning warning in asan_globals.cpp
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 10:49:10 PDT 2022
Author: Mitch Phillips
Date: 2022-07-12T10:48:43-07:00
New Revision: 81c48436bbd29736f77a111fc207e28854939907
URL: https://github.com/llvm/llvm-project/commit/81c48436bbd29736f77a111fc207e28854939907
DIFF: https://github.com/llvm/llvm-project/commit/81c48436bbd29736f77a111fc207e28854939907.diff
LOG: [~NFC] Fix printf() type punning warning in asan_globals.cpp
Added:
Modified:
compiler-rt/lib/asan/asan_globals.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/asan/asan_globals.cpp b/compiler-rt/lib/asan/asan_globals.cpp
index 29eef6c68a516..b780128c9adb4 100644
--- a/compiler-rt/lib/asan/asan_globals.cpp
+++ b/compiler-rt/lib/asan/asan_globals.cpp
@@ -90,7 +90,7 @@ static void ReportGlobal(const Global &g, const char *prefix) {
DataInfo info;
Symbolizer::GetOrInit()->SymbolizeData(g.beg, &info);
if (info.line != 0) {
- Report(" location: name=%s, %d\n", info.file, info.line);
+ Report(" location: name=%s, %d\n", info.file, static_cast<int>(info.line));
}
}
@@ -301,7 +301,7 @@ void PrintGlobalLocation(InternalScopedString *str, const __asan_global &g) {
Symbolizer::GetOrInit()->SymbolizeData(g.beg, &info);
if (info.line != 0) {
- str->append("%s:%d", info.file, info.line);
+ str->append("%s:%d", info.file, static_cast<int>(info.line));
} else {
str->append("%s", g.module_name);
}
More information about the llvm-commits
mailing list