diff --git a/src/unique_path.cpp b/src/unique_path.cpp index 1b05c839..93eb4b11 100644 --- a/src/unique_path.cpp +++ b/src/unique_path.cpp @@ -111,7 +111,7 @@ void system_crypt_random(void* buf, std::size_t len, boost::system::error_code* if (!errval) { - BOOL gen_ok = ::CryptGenRandom(handle, len, static_cast(buf)); + BOOL gen_ok = ::CryptGenRandom(handle, static_cast(len), static_cast(buf)); if (!gen_ok) errval = ::GetLastError(); ::CryptReleaseContext(handle, 0); diff --git a/src/windows_file_codecvt.cpp b/src/windows_file_codecvt.cpp index 998db602..99059598 100644 --- a/src/windows_file_codecvt.cpp +++ b/src/windows_file_codecvt.cpp @@ -40,7 +40,7 @@ int count; if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from, - from_end - from, to, to_end - to)) == 0) + static_cast(from_end - from), to, static_cast(to_end - to))) == 0) { return error; // conversion failed } @@ -60,7 +60,7 @@ int count; if ((count = ::WideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, from, - from_end - from, to, to_end - to, 0, 0)) == 0) + static_cast(from_end - from), to, static_cast(to_end - to), 0, 0)) == 0) { return error; // conversion failed }