[compiler-rt] 40dcf24 - [compiler-rt] Silence warning when building with Clang ToT
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 06:34:40 PST 2024
Author: Alexandre Ganea
Date: 2024-01-25T09:34:18-05:00
New Revision: 40dcf24522af91ab22af2e69f28d1f1d2a860f5c
URL: https://github.com/llvm/llvm-project/commit/40dcf24522af91ab22af2e69f28d1f1d2a860f5c
DIFF: https://github.com/llvm/llvm-project/commit/40dcf24522af91ab22af2e69f28d1f1d2a860f5c.diff
LOG: [compiler-rt] Silence warning when building with Clang ToT
This fixes:
```
[24/47] Generating SANITIZER_TEST_OBJECTS.sanitizer_bitvector_test.cpp.i386.o
C:/git/llvm-project/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp:74:29: warning: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'value_type' (aka 'unsigned long') [-Wformat]
74 | fprintf(stderr, "%zu ", *it);
| ~~~ ^~~
| %lu
1 warning generated.
```
Added:
Modified:
compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp b/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
index 385b6158300caf..670e96552c68f6 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
@@ -71,7 +71,7 @@ void Print(const set<uptr> &s) {
#if defined(_WIN64)
fprintf(stderr, "%llu ", *it);
#else
- fprintf(stderr, "%zu ", *it);
+ fprintf(stderr, "%lu ", *it);
#endif
}
fprintf(stderr, "\n");
More information about the llvm-commits
mailing list