[Lldb-commits] [lldb] 6e38824 - [lldb] Silence GCC/glibc warnings about ignoring the return value of write(). NFC.
Martin Storsjö via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 6 12:50:38 PDT 2022
Author: Martin Storsjö
Date: 2022-04-06T22:50:07+03:00
New Revision: 6e38824221db2e0d77d334d424331b3cf1ac279a
URL: https://github.com/llvm/llvm-project/commit/6e38824221db2e0d77d334d424331b3cf1ac279a
DIFF: https://github.com/llvm/llvm-project/commit/6e38824221db2e0d77d334d424331b3cf1ac279a.diff
LOG: [lldb] Silence GCC/glibc warnings about ignoring the return value of write(). NFC.
This matches how another similar warning is silenced in
Host/posix/ProcessLauncherPosixFork.cpp.
Differential Revision: https://reviews.llvm.org/D123205
Added:
Modified:
lldb/source/Core/Debugger.cpp
Removed:
################################################################################
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index cac5ae4dacd75..37e54a9abefaa 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -893,7 +893,8 @@ Status Debugger::SetInputString(const char *data) {
return result;
}
- write(fds[WRITE], data, size);
+ int r = write(fds[WRITE], data, size);
+ (void)r;
// Close the write end of the pipe, so that the command interpreter will exit
// when it consumes all the data.
llvm::sys::Process::SafelyCloseFileDescriptor(fds[WRITE]);
More information about the lldb-commits
mailing list