[PATCH] D85480: [NFC] Use value initializer for OVERLAPPED
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 15:36:31 PDT 2020
aeubanks created this revision.
aeubanks added reviewers: amccarth, hans.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
aeubanks requested review of this revision.
To fix
../llvm/lib/Support/Windows/Path.inc(1265,21): warning: missing field
'InternalHigh' initializer [-Wmissing-field-initializers]
OVERLAPPED OV = {0};
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85480
Files:
llvm/lib/Support/Windows/Path.inc
Index: llvm/lib/Support/Windows/Path.inc
===================================================================
--- llvm/lib/Support/Windows/Path.inc
+++ llvm/lib/Support/Windows/Path.inc
@@ -1262,7 +1262,7 @@
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 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 unlockFile(int FD) {
- OVERLAPPED OV = {0};
+ OVERLAPPED OV = {};
file_t File = convertFDToNativeFile(FD);
if (::UnlockFileEx(File, 0, MAXDWORD, MAXDWORD, &OV))
return std::error_code();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85480.283751.patch
Type: text/x-patch
Size: 1055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200806/6f7ce9b2/attachment.bin>
More information about the llvm-commits
mailing list