summaryrefslogtreecommitdiff
path: root/lldb/source/Host/windows/MainLoopWindows.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2023-11-03 14:04:26 +0000
committerDavid Spickett <david.spickett@linaro.org>2023-11-03 14:20:05 +0000
commit68fbc8eec38d2930b60e01ffb2cbf297eac658fb (patch)
tree8dbd066fcba5221347ddde59bf3b2fb09ba9b57b /lldb/source/Host/windows/MainLoopWindows.cpp
parentee9220c8e3fe3d738b0e84f706b789326d912937 (diff)
[lldb][NFC] Use UNUSED_IF_ASSERT_DISABLED instead of (void) cast
Uses of (void) remain where they are for purposes other than an assert variable.
Diffstat (limited to 'lldb/source/Host/windows/MainLoopWindows.cpp')
-rw-r--r--lldb/source/Host/windows/MainLoopWindows.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Host/windows/MainLoopWindows.cpp b/lldb/source/Host/windows/MainLoopWindows.cpp
index 6e5f45d98208..25ea305c9976 100644
--- a/lldb/source/Host/windows/MainLoopWindows.cpp
+++ b/lldb/source/Host/windows/MainLoopWindows.cpp
@@ -30,7 +30,7 @@ MainLoopWindows::~MainLoopWindows() {
assert(m_read_fds.empty());
BOOL result = WSACloseEvent(m_trigger_event);
assert(result == TRUE);
- (void)result;
+ UNUSED_IF_ASSERT_DISABLED(result);
}
llvm::Expected<size_t> MainLoopWindows::Poll() {
@@ -39,7 +39,7 @@ llvm::Expected<size_t> MainLoopWindows::Poll() {
for (auto &[fd, info] : m_read_fds) {
int result = WSAEventSelect(fd, info.event, FD_READ | FD_ACCEPT | FD_CLOSE);
assert(result == 0);
- (void)result;
+ UNUSED_IF_ASSERT_DISABLED(result);
events.push_back(info.event);
}
@@ -51,7 +51,7 @@ llvm::Expected<size_t> MainLoopWindows::Poll() {
for (auto &fd : m_read_fds) {
int result = WSAEventSelect(fd.first, WSA_INVALID_EVENT, 0);
assert(result == 0);
- (void)result;
+ UNUSED_IF_ASSERT_DISABLED(result);
}
if (result >= WSA_WAIT_EVENT_0 && result <= WSA_WAIT_EVENT_0 + events.size())
@@ -99,7 +99,7 @@ void MainLoopWindows::UnregisterReadObject(IOObject::WaitableHandle handle) {
assert(it != m_read_fds.end());
BOOL result = WSACloseEvent(it->second.event);
assert(result == TRUE);
- (void)result;
+ UNUSED_IF_ASSERT_DISABLED(result);
m_read_fds.erase(it);
}