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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/67830.diff


1 Files Affected:

- (modified) libc/test/src/stdio/fputc_test.cpp (+1-1) 


``````````diff
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));
   }

``````````

</details>


https://github.com/llvm/llvm-project/pull/67830


More information about the libc-commits mailing list