[compiler-rt] 99be590 - [compiler-rt] Fix -Wformat in timing.h (NFC)
Jie Fu via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 16:49:38 PDT 2023
Author: Jie Fu
Date: 2023-04-04T07:49:27+08:00
New Revision: 99be590cb9b492825dd2cc453efc23d852594d16
URL: https://github.com/llvm/llvm-project/commit/99be590cb9b492825dd2cc453efc23d852594d16
DIFF: https://github.com/llvm/llvm-project/commit/99be590cb9b492825dd2cc453efc23d852594d16.diff
LOG: [compiler-rt] Fix -Wformat in timing.h (NFC)
/home/jiefu/llvm-project/compiler-rt/lib/scudo/standalone/timing.h:181:41: error: format specifies type 'unsigned long long' but the argument has type 'u64' (aka 'unsigned long') [-Werror,-Wformat]
Str.append("%14llu.%llu(ns) %-11s", Integral, Fraction, " ");
~~~~~~ ^~~~~~~~
%14lu
/home/jiefu/llvm-project/compiler-rt/lib/scudo/standalone/timing.h:181:51: error: format specifies type 'unsigned long long' but the argument has type 'u64' (aka 'unsigned long') [-Werror,-Wformat]
Str.append("%14llu.%llu(ns) %-11s", Integral, Fraction, " ");
~~~~ ^~~~~~~~
%lu
/home/jiefu/llvm-project/compiler-rt/lib/scudo/standalone/timing.h:185:54: error: format specifies type 'unsigned long long' but the argument has type 'u64' (aka 'unsigned long') [-Werror,-Wformat]
Str.append("%s (%llu)\n", Timers[HandleId].Name, Occurrence);
~~~~ ^~~~~~~~~~
%lu
3 errors generated.
Added:
Modified:
compiler-rt/lib/scudo/standalone/timing.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/timing.h b/compiler-rt/lib/scudo/standalone/timing.h
index 29eb894fa0a05..c457e96214149 100644
--- a/compiler-rt/lib/scudo/standalone/timing.h
+++ b/compiler-rt/lib/scudo/standalone/timing.h
@@ -178,11 +178,11 @@ class TimingManager {
Occurrence == 0 ? 0
: ((AccumulatedTime % Occurrence) * 10) / Occurrence;
- Str.append("%14llu.%llu(ns) %-11s", Integral, Fraction, " ");
+ Str.append("%14lu.%lu(ns) %-11s", Integral, Fraction, " ");
for (u32 I = 0; I < ExtraIndent; ++I)
Str.append("%s", " ");
- Str.append("%s (%llu)\n", Timers[HandleId].Name, Occurrence);
+ Str.append("%s (%lu)\n", Timers[HandleId].Name, Occurrence);
for (u32 I = 0; I < NumAllocatedTimers; ++I)
if (Timers[I].Nesting == HandleId)
More information about the llvm-commits
mailing list