[libc-commits] [libc] d05093a - [libc] Fix integer conversion error	in test
    Alex Brachet via libc-commits 
    libc-commits at lists.llvm.org
       
    Tue Mar  7 09:49:54 PST 2023
    
    
  
Author: Alex Brachet
Date: 2023-03-07T17:49:47Z
New Revision: d05093a7cf1fb8353f374d7e91f7102e02b234c8
URL: https://github.com/llvm/llvm-project/commit/d05093a7cf1fb8353f374d7e91f7102e02b234c8
DIFF: https://github.com/llvm/llvm-project/commit/d05093a7cf1fb8353f374d7e91f7102e02b234c8.diff
LOG: [libc] Fix integer conversion error in test
Added: 
    
Modified: 
    libc/test/src/string/strerror_test.cpp
Removed: 
    
################################################################################
diff  --git a/libc/test/src/string/strerror_test.cpp b/libc/test/src/string/strerror_test.cpp
index 3830e1b6c01d..20a8fba6f30f 100644
--- a/libc/test/src/string/strerror_test.cpp
+++ b/libc/test/src/string/strerror_test.cpp
@@ -150,7 +150,7 @@ TEST(LlvmLibcStrErrorTest, KnownErrors) {
   };
 
   for (size_t i = 0; i < (sizeof(message_array) / sizeof(char *)); ++i) {
-    EXPECT_STREQ(__llvm_libc::strerror(i), message_array[i]);
+    EXPECT_STREQ(__llvm_libc::strerror(static_cast<int>(i)), message_array[i]);
   }
 }
 
        
    
    
More information about the libc-commits
mailing list