Skip to content

Commit

Permalink
[llvm][NFC] Suppress -Wunused-result call to write
Browse files Browse the repository at this point in the history
Commit 87e6f87 adds a call to `::write()`, which may be annotated w/ `warn_unused_result`, leading to `-Wunused-result` failures.
  • Loading branch information
rupprecht committed Apr 11, 2024
1 parent 51f1681 commit 6b46166
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/Support/raw_socket_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,10 @@ void ListeningSocket::shutdown() {

// Ensure ::poll returns if shutdown is called by a seperate thread
char Byte = 'A';
::write(PipeFD[1], &Byte, 1);
ssize_t written = ::write(PipeFD[1], &Byte, 1);

// Ignore any write() error
(void)written;
}

ListeningSocket::~ListeningSocket() {
Expand Down

0 comments on commit 6b46166

Please sign in to comment.