From 2b5502c3503ececff3b3da1026cd635b026eced6 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Thu, 6 Aug 2020 15:33:33 -0700 Subject: [PATCH] [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 --- llvm/lib/Support/Windows/Path.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc index 3570d1d6e0563..0115161636c4b 100644 --- a/llvm/lib/Support/Windows/Path.inc +++ b/llvm/lib/Support/Windows/Path.inc @@ -1262,7 +1262,7 @@ Expected readNativeFileSlice(file_t FileHandle, std::error_code tryLockFile(int FD, std::chrono::milliseconds Timeout) { DWORD Flags = LOCKFILE_EXCLUSIVE_LOCK | LOCKFILE_FAIL_IMMEDIATELY; - OVERLAPPED OV = {0}; + OVERLAPPED OV = {}; file_t File = convertFDToNativeFile(FD); auto Start = std::chrono::steady_clock::now(); auto End = Start + Timeout; @@ -1281,7 +1281,7 @@ std::error_code tryLockFile(int FD, std::chrono::milliseconds Timeout) { std::error_code lockFile(int FD) { DWORD Flags = LOCKFILE_EXCLUSIVE_LOCK; - OVERLAPPED OV = {0}; + OVERLAPPED OV = {}; file_t File = convertFDToNativeFile(FD); if (::LockFileEx(File, Flags, 0, MAXDWORD, MAXDWORD, &OV)) return std::error_code(); @@ -1290,7 +1290,7 @@ std::error_code lockFile(int FD) { } std::error_code unlockFile(int FD) { - OVERLAPPED OV = {0}; + OVERLAPPED OV = {}; file_t File = convertFDToNativeFile(FD); if (::UnlockFileEx(File, 0, MAXDWORD, MAXDWORD, &OV)) return std::error_code();