Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc] Fix unused variable in fputc test #67830

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

mikhailramalho
Copy link
Member

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

This is probably a copy-and-paste error and the variable was left
unused.
@llvmbot
Copy link
Collaborator

llvmbot commented Sep 29, 2023

@llvm/pr-subscribers-libc

Changes

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

@mikhailramalho mikhailramalho merged commit dbceb1d into llvm:main Sep 29, 2023
3 checks passed
@mikhailramalho mikhailramalho deleted the libc-fix-fputc-test branch September 29, 2023 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants