Skip to content

Commit 2b5502c

Browse files
committed
[NFC] Use value initializer for OVERLAPPED
To fix ../llvm/lib/Support/Windows/Path.inc(1265,21): warning: missing field 'InternalHigh' initializer [-Wmissing-field-initializers] OVERLAPPED OV = {0}; Differential Revision: https://reviews.llvm.org/D85480
1 parent 04bd5b5 commit 2b5502c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Support/Windows/Path.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ Expected<size_t> readNativeFileSlice(file_t FileHandle,
12621262

12631263
std::error_code tryLockFile(int FD, std::chrono::milliseconds Timeout) {
12641264
DWORD Flags = LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY;
1265-
OVERLAPPED OV = {0};
1265+
OVERLAPPED OV = {};
12661266
file_t File = convertFDToNativeFile(FD);
12671267
auto Start = std::chrono::steady_clock::now();
12681268
auto End = Start + Timeout;
@@ -1281,7 +1281,7 @@ std::error_code tryLockFile(int FD, std::chrono::milliseconds Timeout) {
12811281

12821282
std::error_code lockFile(int FD) {
12831283
DWORD Flags = LOCKFILE_EXCLUSIVE_LOCK;
1284-
OVERLAPPED OV = {0};
1284+
OVERLAPPED OV = {};
12851285
file_t File = convertFDToNativeFile(FD);
12861286
if (::LockFileEx(File, Flags, 0, MAXDWORD, MAXDWORD, &OV))
12871287
return std::error_code();
@@ -1290,7 +1290,7 @@ std::error_code lockFile(int FD) {
12901290
}
12911291

12921292
std::error_code unlockFile(int FD) {
1293-
OVERLAPPED OV = {0};
1293+
OVERLAPPED OV = {};
12941294
file_t File = convertFDToNativeFile(FD);
12951295
if (::UnlockFileEx(File, 0, MAXDWORD, MAXDWORD, &OV))
12961296
return std::error_code();

0 commit comments

Comments
 (0)