From 759f6f375abed7822fb54c89eb74ce45ac3db216 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Fri, 13 Aug 2021 17:32:42 +0900 Subject: [PATCH] Fix static analysis issue Should return unsigned int type. Change-Id: I863f772e9542f176465acc8ba70553daf2b5c311 --- dali/internal/adaptor/android/framework-android.cpp | 2 +- dali/internal/adaptor/androidjni/framework-androidjni.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dali/internal/adaptor/android/framework-android.cpp b/dali/internal/adaptor/android/framework-android.cpp index 0f93208..e01ff71 100644 --- a/dali/internal/adaptor/android/framework-android.cpp +++ b/dali/internal/adaptor/android/framework-android.cpp @@ -612,7 +612,7 @@ unsigned int Framework::AddIdle(int timeout, void* data, bool (*callback)(void* return mImpl->AddIdle(timeout, data, callback); } - return -1; + return 0; } void Framework::RemoveIdle(unsigned int id) { diff --git a/dali/internal/adaptor/androidjni/framework-androidjni.cpp b/dali/internal/adaptor/androidjni/framework-androidjni.cpp index 6fc0f63..caa35be 100644 --- a/dali/internal/adaptor/androidjni/framework-androidjni.cpp +++ b/dali/internal/adaptor/androidjni/framework-androidjni.cpp @@ -123,21 +123,21 @@ unsigned int Framework::AddIdle(int timeout, void* data, bool (*callback)(void* if(javaVM == nullptr || javaVM->GetEnv(reinterpret_cast(&env), JNI_VERSION_1_6) != JNI_OK) { DALI_LOG_ERROR("Couldn't get JNI env."); - return -1; + return 0; } jclass clazz = env->FindClass("com/sec/daliview/DaliView"); if(!clazz) { DALI_LOG_ERROR("Couldn't find com.sec.daliview.DaliView."); - return -1; + return 0; } jmethodID addIdle = env->GetStaticMethodID(clazz, "addIdle", "(JJJ)I"); if(!addIdle) { DALI_LOG_ERROR("Couldn't find com.sec.daliview.DaliView.addIdle."); - return -1; + return 0; } jint id = env->CallStaticIntMethod(clazz, addIdle, reinterpret_cast(callback), reinterpret_cast(data), static_cast(timeout)); -- 2.7.4