[~NFC] Fix printf() type punning warning in asan_globals.cpp

This commit is contained in:
Mitch Phillips 2022-07-12 10:48:19 -07:00
parent fcb7d76d65
commit 81c48436bb
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}