diff --git a/helpers/common_helpers.cpp b/helpers/common_helpers.cpp index 21942dbe..6e74154b 100644 --- a/helpers/common_helpers.cpp +++ b/helpers/common_helpers.cpp @@ -275,7 +275,7 @@ bool common_helpers::file_exist(const std::wstring &filepath) bool common_helpers::file_size(const std::filesystem::path &filepath, size_t &size) { if (common_helpers::file_exist(filepath)) { - size = std::filesystem::file_size(filepath); + size = static_cast(std::filesystem::file_size(filepath)); return true; } return false; diff --git a/helpers/pe_helpers.cpp b/helpers/pe_helpers.cpp index 4a6e960a..9a7db3e0 100644 --- a/helpers/pe_helpers.cpp +++ b/helpers/pe_helpers.cpp @@ -231,7 +231,7 @@ std::string pe_helpers::get_err_string(DWORD code) code, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), (LPSTR)&err_str[0], - err_str.size(), + static_cast(err_str.size()), NULL); if (!msg_chars) return std::string(); diff --git a/resources/win/file_dos_stub/file_dos_stub.cpp b/resources/win/file_dos_stub/file_dos_stub.cpp index 190b4831..3f3097d4 100644 --- a/resources/win/file_dos_stub/file_dos_stub.cpp +++ b/resources/win/file_dos_stub/file_dos_stub.cpp @@ -35,7 +35,7 @@ static std::vector load_file_partial(std::fstream &file) file.seekg(org_pos, std::ios::beg); return data; } - catch(const std::exception& e) + catch(...) { return std::vector(); } @@ -55,7 +55,7 @@ int main(int argc, char* *argv) return 1; } - for (size_t i = 1; i < argc; ++i) { + for (size_t i = 1; i < (size_t)argc; ++i) { auto arg = argv[i]; std::fstream file(arg, std::ios::in | std::ios::out | std::ios::binary); if (!file.is_open()) {