[libc-commits] [libc] 225eb8a - [libc][NFC] Fix onre more -Wconversion warning in strtoul test code.

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Fri Aug 27 14:13:08 PDT 2021


Author: Roland McGrath
Date: 2021-08-27T14:12:39-07:00
New Revision: 225eb8a22d416c1c7405770165c3291ab0ee3dba

URL: https://github.com/llvm/llvm-project/commit/225eb8a22d416c1c7405770165c3291ab0ee3dba
DIFF: https://github.com/llvm/llvm-project/commit/225eb8a22d416c1c7405770165c3291ab0ee3dba.diff

LOG: [libc][NFC] Fix onre more -Wconversion warning in strtoul test code.

The last change missed one spot.

Differential Revision: https://reviews.llvm.org/D108845

Added: 
    

Modified: 
    libc/test/src/stdlib/strtoul_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/src/stdlib/strtoul_test.cpp b/libc/test/src/stdlib/strtoul_test.cpp
index 16ca6b023bd4e..7b08a399bbfb0 100644
--- a/libc/test/src/stdlib/strtoul_test.cpp
+++ b/libc/test/src/stdlib/strtoul_test.cpp
@@ -227,7 +227,7 @@ TEST(LlvmLibcStrToULTest, DecodeInOtherBases) {
             } else {
               errno = 0;
               ASSERT_EQ(__llvm_libc::strtoul(small_string, nullptr, base),
-                        first_digit);
+                        static_cast<unsigned long int>(first_digit));
               ASSERT_EQ(errno, 0);
             }
           } else {


        


More information about the libc-commits mailing list