[Lldb-commits] [lldb] 7891270 - [lldb][Windows] Fix compilation warnings
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 3 03:43:40 PDT 2025
Author: David Spickett
Date: 2025-07-03T10:43:20Z
New Revision: 789127036dc90a363b04325be4f1bc9e29d709fd
URL: https://github.com/llvm/llvm-project/commit/789127036dc90a363b04325be4f1bc9e29d709fd
DIFF: https://github.com/llvm/llvm-project/commit/789127036dc90a363b04325be4f1bc9e29d709fd.diff
LOG: [lldb][Windows] Fix compilation warnings
As seen on Linaro's Windows on Arm bot.
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Host\windows\MainLoopWindows.cpp(80,25): warning: missing field 'InternalHigh' initializer [-Wmissing-field-initializers]
80 | OVERLAPPED ov = {0};
| ^
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Host\windows\MainLoopWindows.cpp(135,8): warning: 'WillPoll' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
135 | void WillPoll() {
| ^
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\include\lldb/Host/windows/MainLoopWindows.h(40,18): note: overridden virtual function is here
40 | virtual void WillPoll() {}
| ^
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Host\windows\MainLoopWindows.cpp(142,8): warning: 'DidPoll' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
142 | void DidPoll() {
| ^
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\include\lldb/Host/windows/MainLoopWindows.h(41,18): note: overridden virtual function is here
41 | virtual void DidPoll() {}
| ^
C:\Users\tcwg\llvm-worker\lldb-aarch64-windows\llvm-project\lldb\source\Host\windows\MainLoopWindows.cpp(80,25): warning: missing field 'InternalHigh' initializer [-Wmissing-field-initializers]
80 | OVERLAPPED ov = {0};
| ^
Added:
Modified:
lldb/source/Host/windows/MainLoopWindows.cpp
Removed:
################################################################################
diff --git a/lldb/source/Host/windows/MainLoopWindows.cpp b/lldb/source/Host/windows/MainLoopWindows.cpp
index 91a8bc805c6b4..b3322e8b3ae59 100644
--- a/lldb/source/Host/windows/MainLoopWindows.cpp
+++ b/lldb/source/Host/windows/MainLoopWindows.cpp
@@ -77,7 +77,8 @@ class PipeEvent : public MainLoopWindows::IOEvent {
do {
char buf[1];
DWORD bytes_read = 0;
- OVERLAPPED ov = {0};
+ OVERLAPPED ov;
+ ZeroMemory(&ov, sizeof(ov));
// Block on a 0-byte read; this will only resume when data is
// available in the pipe. The pipe must be PIPE_WAIT or this thread
// will spin.
@@ -132,14 +133,14 @@ class SocketEvent : public MainLoopWindows::IOEvent {
~SocketEvent() override { WSACloseEvent(m_event); }
- void WillPoll() {
+ void WillPoll() override {
int result =
WSAEventSelect(m_socket, m_event, FD_READ | FD_ACCEPT | FD_CLOSE);
assert(result == 0);
UNUSED_IF_ASSERT_DISABLED(result);
}
- void DidPoll() {
+ void DidPoll() override {
int result = WSAEventSelect(m_socket, WSA_INVALID_EVENT, 0);
assert(result == 0);
UNUSED_IF_ASSERT_DISABLED(result);
More information about the lldb-commits
mailing list