summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
authorNinni Pipping <over999ships@gmail.com>2023-05-11 12:32:23 +0200
committerRĂ©mi Verschelde <rverschelde@gmail.com>2023-05-12 13:56:48 +0200
commitf93a4287cf833134020e5b35c4b800c2edff1b94 (patch)
treea902c82bc0039af8f8a403105682427fcab0bad1 /drivers/unix
parent09c5a8fe496217f408fea27a470ac8f990f3b20b (diff)
Enable shadow warnings and fix raised errors
(cherry picked from commit 71ee65dc5701a0675ae6b1879a694a28c7206a63)
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/file_access_unix.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index ee3cb876cf..172f2a044c 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -284,11 +284,11 @@ bool FileAccessUnix::file_exists(const String &p_path) {
uint64_t FileAccessUnix::_get_modified_time(const String &p_file) {
String file = fix_path(p_file);
- struct stat flags = {};
- int err = stat(file.utf8().get_data(), &flags);
+ struct stat status = {};
+ int err = stat(file.utf8().get_data(), &status);
if (!err) {
- return flags.st_mtime;
+ return status.st_mtime;
} else {
print_verbose("Failed to get modified time for: " + p_file + "");
return 0;
@@ -297,11 +297,11 @@ uint64_t FileAccessUnix::_get_modified_time(const String &p_file) {
uint32_t FileAccessUnix::_get_unix_permissions(const String &p_file) {
String file = fix_path(p_file);
- struct stat flags = {};
- int err = stat(file.utf8().get_data(), &flags);
+ struct stat status = {};
+ int err = stat(file.utf8().get_data(), &status);
if (!err) {
- return flags.st_mode & 0x7FF; //only permissions
+ return status.st_mode & 0x7FF; //only permissions
} else {
ERR_FAIL_V_MSG(0, "Failed to get unix permissions for: " + p_file + ".");
}