[compiler-rt] 9cc3ebf - Fix warning: format specifies type 'unsigned long' but the argument has type 'unsigned long long' [-Wformat]

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 4 11:43:56 PST 2019


Author: Alexandre Ganea
Date: 2019-11-04T14:42:07-05:00
New Revision: 9cc3ebf8b7630e30bc0eea6dc4a55348edf71091

URL: https://github.com/llvm/llvm-project/commit/9cc3ebf8b7630e30bc0eea6dc4a55348edf71091
DIFF: https://github.com/llvm/llvm-project/commit/9cc3ebf8b7630e30bc0eea6dc4a55348edf71091.diff

LOG: Fix warning: format specifies type 'unsigned long' but the argument has type 'unsigned long long' [-Wformat]

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 d6e61485738f..670e96552c68 100644
--- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
+++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_bitvector_test.cpp
@@ -68,7 +68,11 @@ void Print(const BV &bv) {
 
 void Print(const set<uptr> &s) {
   for (set<uptr>::iterator it = s.begin(); it != s.end(); ++it) {
+#if defined(_WIN64)
+    fprintf(stderr, "%llu ", *it);
+#else
     fprintf(stderr, "%lu ", *it);
+#endif
   }
   fprintf(stderr, "\n");
 }


        


More information about the llvm-commits mailing list