Skip to content

Commit 6b46166

Browse files
committed
[llvm][NFC] Suppress -Wunused-result call to write
Commit 87e6f87 adds a call to `::write()`, which may be annotated w/ `warn_unused_result`, leading to `-Wunused-result` failures.
1 parent 51f1681 commit 6b46166

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Support/raw_socket_stream.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@ void ListeningSocket::shutdown() {
265265

266266
// Ensure ::poll returns if shutdown is called by a seperate thread
267267
char Byte = 'A';
268-
::write(PipeFD[1], &Byte, 1);
268+
ssize_t written = ::write(PipeFD[1], &Byte, 1);
269+
270+
// Ignore any write() error
271+
(void)written;
269272
}
270273

271274
ListeningSocket::~ListeningSocket() {

0 commit comments

Comments
 (0)