summaryrefslogtreecommitdiff
path: root/drivers/windows/file_access_windows.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-06-15 12:11:30 +0200
committerRémi Verschelde <rverschelde@gmail.com>2019-06-15 14:40:45 +0200
commit68735d2a886bc2cf6b0a4300d1aa5ece952929ed (patch)
tree2941482adee4afc860bca3fb9968f40114249d2d /drivers/windows/file_access_windows.cpp
parent0a3c21d999559617cc9cdfe261d631e6d1267374 (diff)
Fix compilation warnings in JS and Windows builds
Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0. JS can now build with `werror=yes warnings=extra`. MinGW64 still has a few warnings to resolve with `warnings=extra`, and only one with `warnings=all`. Part of #29033 and #29801.
Diffstat (limited to 'drivers/windows/file_access_windows.cpp')
-rw-r--r--drivers/windows/file_access_windows.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index 31360d319f..646e744248 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -93,7 +93,7 @@ Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) {
// a file using the wrong case (which *works* on Windows, but won't on other
// platforms).
if (p_mode_flags == READ) {
- WIN32_FIND_DATAW d = { 0 };
+ WIN32_FIND_DATAW d;
HANDLE f = FindFirstFileW(path.c_str(), &d);
if (f) {
String fname = d.cFileName;
@@ -302,7 +302,7 @@ void FileAccessWindows::store_buffer(const uint8_t *p_src, int p_length) {
}
prev_op = WRITE;
}
- ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != p_length);
+ ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != (size_t)p_length);
}
bool FileAccessWindows::file_exists(const String &p_name) {