[libc-commits] [libc] dbceb1d - [libc] Fix unused variable in fputc test (#67830)

via libc-commits libc-commits at lists.llvm.org
Fri Sep 29 09:31:45 PDT 2023


Author: Mikhail R. Gadelha
Date: 2023-09-29T12:31:40-04:00
New Revision: dbceb1d93667b2d29e78939cc24f67665fb5109b

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

LOG: [libc] Fix unused variable in fputc test (#67830)

This is probably a copy-and-paste error and the variable 'more' was left
unused.

Added: 
    

Modified: 
    libc/test/src/stdio/fputc_test.cpp

Removed: 
    


################################################################################
diff  --git a/libc/test/src/stdio/fputc_test.cpp b/libc/test/src/stdio/fputc_test.cpp
index 578403fc374b018..0a776f70e353ddd 100644
--- a/libc/test/src/stdio/fputc_test.cpp
+++ b/libc/test/src/stdio/fputc_test.cpp
@@ -22,7 +22,7 @@ TEST(LlvmLibcPutcTest, PrintOut) {
   }
 
   constexpr char more[] = "A simple string written to stderr\n";
-  for (const char &c : simple) {
+  for (const char &c : more) {
     result = LIBC_NAMESPACE::fputc(
         c, reinterpret_cast<FILE *>(LIBC_NAMESPACE::stderr));
   }


        


More information about the libc-commits mailing list