diff options
author | Dualtagh Murray <dualtagh.murray@gonitro.com> | 2018-10-04 14:38:52 +0100 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-10-19 11:45:24 +0200 |
commit | b902a2f2a7438810cdcb053568ed5c27089b1e8a (patch) | |
tree | 0a70fb9dd0093ea6f3ad024616c665f9669077ff /core/io | |
parent | a3072aa35e3bfd69d826fa33328b3ce1862f472a (diff) |
Fixing warnings generated by MSVC
Fixes #22684.
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/logger.cpp | 4 | ||||
-rw-r--r-- | core/io/resource_format_binary.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/core/io/logger.cpp b/core/io/logger.cpp index 051c02ab32..01755c8ee9 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -45,6 +45,10 @@ #endif #endif +#if defined(MINGW_ENABLED) || defined(_MSC_VER) +#define sprintf sprintf_s +#endif + bool Logger::should_log(bool p_err) { return (!p_err || _print_error_enabled) && (p_err || _print_line_enabled); } diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index e5741014a4..aa73d7bc5c 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1309,7 +1309,7 @@ void ResourceFormatSaverBinaryInstance::write_variant(FileAccess *f, const Varia case Variant::INT: { int64_t val = p_property; - if (val > 0x7FFFFFFF || val < -0x80000000) { + if (val > 0x7FFFFFFF || val < -(int64_t)0x80000000) { f->store_32(VARIANT_INT64); f->store_64(val); |