[Lldb-commits] [PATCH] D123205: [lldb] Silence GCC/glibc warnings about ignoring the return value of write(). NFC.

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 6 04:56:01 PDT 2022


mstorsjo created this revision.
mstorsjo added a reviewer: labath.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: LLDB.

This matches how another similar warning is silenced in
Host/posix/ProcessLauncherPosixFork.cpp.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D123205

Files:
  lldb/source/Core/Debugger.cpp


Index: lldb/source/Core/Debugger.cpp
===================================================================
--- lldb/source/Core/Debugger.cpp
+++ lldb/source/Core/Debugger.cpp
@@ -893,7 +893,8 @@
     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]);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123205.420792.patch
Type: text/x-patch
Size: 488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220406/273f07d3/attachment-0001.bin>


More information about the lldb-commits mailing list