mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-23 11:15:34 +08:00
fix some compiler warnings for dos_stub
This commit is contained in:
parent
3a45d61147
commit
452b781fc0
@ -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<size_t>(std::filesystem::file_size(filepath));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -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<DWORD>(err_str.size()),
|
||||
NULL);
|
||||
|
||||
if (!msg_chars) return std::string();
|
||||
|
@ -35,7 +35,7 @@ static std::vector<uint8_t> load_file_partial(std::fstream &file)
|
||||
file.seekg(org_pos, std::ios::beg);
|
||||
return data;
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
catch(...)
|
||||
{
|
||||
return std::vector<uint8_t>();
|
||||
}
|
||||
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user