[llvm] 2b5502c - [NFC] Use value initializer for OVERLAPPED
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 11:18:39 PDT 2020
Author: Arthur Eubanks
Date: 2020-08-07T11:18:33-07:00
New Revision: 2b5502c3503ececff3b3da1026cd635b026eced6
URL: https://github.com/llvm/llvm-project/commit/2b5502c3503ececff3b3da1026cd635b026eced6
DIFF: https://github.com/llvm/llvm-project/commit/2b5502c3503ececff3b3da1026cd635b026eced6.diff
LOG: [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
Added:
Modified:
llvm/lib/Support/Windows/Path.inc
Removed:
################################################################################
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 3570d1d6e056..0115161636c4 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -1262,7 +1262,7 @@ Expected<size_t> 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();
More information about the llvm-commits
mailing list