Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Feb 10, 2025

No description provided.

@keith keith requested a review from JDevlieghere as a code owner February 10, 2025 19:07
@keith keith requested a review from ashgti February 10, 2025 19:07
@keith
Copy link
Member Author

keith commented Feb 10, 2025

showed up since adb9ef0

@keith
Copy link
Member Author

keith commented Feb 10, 2025

lldb/tools/lldb-dap/OutputRedirector.cpp:89:5: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
   89 |     ::write(fd, buf, sizeof(buf));
      |     ^~~~~~~ ~~~~~~~~~~~~~~~~~~~~
1 error generated.

@llvmbot
Copy link
Member

llvmbot commented Feb 10, 2025

@llvm/pr-subscribers-lldb

Author: Keith Smiley (keith)

Changes

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

1 Files Affected:

  • (modified) lldb/tools/lldb-dap/OutputRedirector.cpp (+1-1)
diff --git a/lldb/tools/lldb-dap/OutputRedirector.cpp b/lldb/tools/lldb-dap/OutputRedirector.cpp
index 7935e17a653bec3..a23572ab7ae0425 100644
--- a/lldb/tools/lldb-dap/OutputRedirector.cpp
+++ b/lldb/tools/lldb-dap/OutputRedirector.cpp
@@ -86,7 +86,7 @@ void OutputRedirector::Stop() {
     // write descriptor is duplicated (to stdout/err or to another process).
     // Write a null byte to ensure the read call returns.
     char buf[] = "\0";
-    ::write(fd, buf, sizeof(buf));
+    (void)::write(fd, buf, sizeof(buf));
     ::close(fd);
     m_forwarder.join();
   }

@keith keith merged commit 1932ed0 into llvm:main Feb 10, 2025
10 checks passed
@keith keith deleted the ks/lldb-dap-silence-wunused-result-warning branch February 10, 2025 23:20
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request Feb 11, 2025
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
JDevlieghere pushed a commit to swiftlang/llvm-project that referenced this pull request Feb 25, 2025
SquallATF pushed a commit to SquallATF/llvm-project that referenced this pull request Jun 13, 2025
SquallATF pushed a commit to SquallATF/llvm-project that referenced this pull request Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants