Fix static analysis issue 71/262571/2
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 13 Aug 2021 08:32:42 +0000 (17:32 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Wed, 18 Aug 2021 07:27:05 +0000 (16:27 +0900)
Should return unsigned int type.

Change-Id: I863f772e9542f176465acc8ba70553daf2b5c311

dali/internal/adaptor/android/framework-android.cpp
dali/internal/adaptor/androidjni/framework-androidjni.cpp

index 0f93208..e01ff71 100644 (file)
@@ -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)
 {
index 6fc0f63..caa35be 100644 (file)
@@ -123,21 +123,21 @@ unsigned int Framework::AddIdle(int timeout, void* data, bool (*callback)(void*
   if(javaVM == nullptr || javaVM->GetEnv(reinterpret_cast<void**>(&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<jlong>(callback), reinterpret_cast<jlong>(data), static_cast<jlong>(timeout));