Skip to content

Commit f332c4f

Browse files
committed
Merge bitcoin/bitcoin#26090: fs: fully initialize _OVERLAPPED for win32
02c9e56 fs: fully initialize _OVERLAPPED for win32 (Cory Fields) Pull request description: ```bash fs.cpp: In member function ‘bool fsbridge::FileLock::TryLock()’: fs.cpp:129:32: error: missing initializer for member ‘_OVERLAPPED::InternalHigh’ [-Werror=missing-field-initializers] 129 | _OVERLAPPED overlapped = {0}; | ^ fs.cpp:129:32: error: missing initializer for member ‘_OVERLAPPED::<anonymous>’ [-Werror=missing-field-initializers] fs.cpp:129:32: error: missing initializer for member ‘_OVERLAPPED::hEvent’ [-Werror=missing-field-initializers] ``` Came up in #25972. That PR is now rebased on this change. Closes: #26006 ACKs for top commit: sipsorcery: tACK 02c9e56. hebasto: ACK 02c9e56, tested on Linux x86_64: Tree-SHA512: 6a0495c34bd952b2bb8c994a1450da7d3eee61225bb4ff0ce009c013f5e29dba94bb1c3ecef9989dc18c939909fdc8eba690a38f96da431ae9d64c23656de7d0
2 parents 20f03a5 + 02c9e56 commit f332c4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ bool FileLock::TryLock()
126126
if (hFile == INVALID_HANDLE_VALUE) {
127127
return false;
128128
}
129-
_OVERLAPPED overlapped = {0};
129+
_OVERLAPPED overlapped = {};
130130
if (!LockFileEx(hFile, LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY, 0, std::numeric_limits<DWORD>::max(), std::numeric_limits<DWORD>::max(), &overlapped)) {
131131
reason = GetErrorReason();
132132
return false;

0 commit comments

Comments
 (0)