diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-08 08:16:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 08:16:50 +0200 |
commit | af801820169865498f074ea9f155e680fc6db027 (patch) | |
tree | 552484a6f3a9336c344bcae53428c54345c0035b /platform | |
parent | 17e9030e485e0b9147fa573d45ab71f606b3442b (diff) | |
parent | 9a77d748c0d4e1c3dceb40216b9a345073032361 (diff) |
Merge pull request #30407 from qarmin/small_fixess
Fixes minor issues found by static analyzer
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/file_access_jandroid.cpp | 2 | ||||
-rw-r--r-- | platform/x11/godot_x11.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/platform/android/file_access_jandroid.cpp b/platform/android/file_access_jandroid.cpp index 63bc5f69d1..5b8cf01138 100644 --- a/platform/android/file_access_jandroid.cpp +++ b/platform/android/file_access_jandroid.cpp @@ -62,7 +62,7 @@ Error FileAccessJAndroid::_open(const String &p_path, int p_mode_flags) { JNIEnv *env = ThreadAndroid::get_env(); jstring js = env->NewStringUTF(path.utf8().get_data()); - int res = env->CallIntMethod(io, _file_open, js, p_mode_flags & WRITE ? true : false); + int res = env->CallIntMethod(io, _file_open, js, (p_mode_flags & WRITE) ? true : false); env->DeleteLocalRef(js); OS::get_singleton()->print("fopen: '%s' ret %i\n", path.utf8().get_data(), res); diff --git a/platform/x11/godot_x11.cpp b/platform/x11/godot_x11.cpp index 9baa4d6dca..755ef7a84f 100644 --- a/platform/x11/godot_x11.cpp +++ b/platform/x11/godot_x11.cpp @@ -43,6 +43,7 @@ int main(int argc, char *argv[]) { setlocale(LC_CTYPE, ""); char *cwd = (char *)malloc(PATH_MAX); + ERR_FAIL_COND_V(!cwd, ERR_OUT_OF_MEMORY); char *ret = getcwd(cwd, PATH_MAX); Error err = Main::setup(argv[0], argc - 1, &argv[1]); |