diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-11-26 23:17:15 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-19 03:43:24 +0200 |
commit | 06c3a46e75ff644dff84bf6522e7eae1b4ee002c (patch) | |
tree | 18d1702ad5e7ff9d0aef181c8fa5908a83bc0458 /onlineupdate | |
parent | 276155ebe520618900268d9e617ed71708ed5701 (diff) |
fix warnings in windows only code
Change-Id: I33079d9f895e4c596a7804ec1bf6b3acde891ae7
Diffstat (limited to 'onlineupdate')
-rw-r--r-- | onlineupdate/source/update/updater/updater.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx index 61975e9cd369..dcf5cfb4a6e2 100644 --- a/onlineupdate/source/update/updater/updater.cxx +++ b/onlineupdate/source/update/updater/updater.cxx @@ -1376,7 +1376,7 @@ PatchFile::~PatchFile() // this call is here in case Execute errors out. #ifdef _WIN32 if (mPatchStream) { - UnlockFile((HANDLE)_get_osfhandle(fileno(mPatchStream)), 0, 0, -1, -1); + UnlockFile((HANDLE)_get_osfhandle(fileno(mPatchStream)), (DWORD)0, (DWORD)0, (DWORD)-1, (DWORD)-1); } #endif @@ -1486,7 +1486,7 @@ PatchFile::Prepare() #ifdef _WIN32 // Lock the patch file, so it can't be messed with between // when we're done creating it and when we go to apply it. - if (!LockFile((HANDLE)_get_osfhandle(fileno(mPatchStream)), 0, 0, -1, -1)) { + if (!LockFile((HANDLE)_get_osfhandle(fileno(mPatchStream)), (DWORD)0, (DWORD)0, (DWORD)-1, (DWORD)-1)) { LOG(("Couldn't lock patch file: %d", GetLastError())); return LOCK_ERROR_PATCH_FILE; } @@ -1624,7 +1624,7 @@ PatchFile::Execute() // Make sure mPatchStream gets unlocked on Windows; the system will do that, // but not until some indeterminate future time, and we want determinism. #ifdef XP_WIN - UnlockFile((HANDLE)_get_osfhandle(fileno(mPatchStream)), 0, 0, -1, -1); + UnlockFile((HANDLE)_get_osfhandle(fileno(mPatchStream)), (DWORD)0, (DWORD)0, (DWORD)-1, (DWORD)-1); #endif // Set mPatchStream to nullptr to make AutoFile close the file, // so it can be deleted on Windows. |