[compiler-rt] [sanitizer] Add missing bitcast to sanitizer_bitvector_test.cpp (PR #192090)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 10:20:05 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Thurston Dang (thurstond)
<details>
<summary>Changes</summary>
Fixes buildbot report
(https://lab.llvm.org/buildbot/#/builders/66/builds/29379):
/home/b/sanitizer-x86_64-linux/build/llvm-project/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp:64:29: error: format specifies type 'unsigned long' but the argument has type 'uptr' (aka 'unsigned int') [-Werror,-Wformat]
64 | fprintf(stderr, "%lu ", idx);
| ~~~ ^~~
| %u
---
Full diff: https://github.com/llvm/llvm-project/pull/192090.diff
1 Files Affected:
- (modified) compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp (+1-1)
``````````diff
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 9f51d0cb0c68e..dc22dfd59fd90 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
@@ -61,7 +61,7 @@ void Print(const BV &bv) {
t.copyFrom(bv);
while (!t.empty()) {
uptr idx = t.getAndClearFirstOne();
- fprintf(stderr, "%lu ", idx);
+ fprintf(stderr, "%lu ", (unsigned long)idx);
}
fprintf(stderr, "\n");
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/192090
More information about the llvm-commits
mailing list