mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-27 05:04:01 +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)
|
bool common_helpers::file_size(const std::filesystem::path &filepath, size_t &size)
|
||||||
{
|
{
|
||||||
if (common_helpers::file_exist(filepath)) {
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -231,7 +231,7 @@ std::string pe_helpers::get_err_string(DWORD code)
|
|||||||
code,
|
code,
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL),
|
||||||
(LPSTR)&err_str[0],
|
(LPSTR)&err_str[0],
|
||||||
err_str.size(),
|
static_cast<DWORD>(err_str.size()),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!msg_chars) return std::string();
|
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);
|
file.seekg(org_pos, std::ios::beg);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
catch(const std::exception& e)
|
catch(...)
|
||||||
{
|
{
|
||||||
return std::vector<uint8_t>();
|
return std::vector<uint8_t>();
|
||||||
}
|
}
|
||||||
@ -55,7 +55,7 @@ int main(int argc, char* *argv)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 1; i < argc; ++i) {
|
for (size_t i = 1; i < (size_t)argc; ++i) {
|
||||||
auto arg = argv[i];
|
auto arg = argv[i];
|
||||||
std::fstream file(arg, std::ios::in | std::ios::out | std::ios::binary);
|
std::fstream file(arg, std::ios::in | std::ios::out | std::ios::binary);
|
||||||
if (!file.is_open()) {
|
if (!file.is_open()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user