fix potentional bugs from coverity report 94/237494/1 accepted/tizen/unified/20200707.141002 submit/tizen/20200705.221213
authorWonki Kim <wonki_.kim@samsung.com>
Wed, 1 Jul 2020 02:30:53 +0000 (11:30 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 1 Jul 2020 02:32:15 +0000 (11:32 +0900)
this patch fixes potentional bugs which has reported from static analyzer

Change-Id: I35f2363fcedf8f649bb1288e6a2ba57b3fa0f744

libaurum/src/DeviceImpl/TizenImpl.cc

index 8f2def652f55bc356ff502455ac46dfc35888342..fc9f0570dec6a550d2ad01bd227e5adf51902053 100644 (file)
@@ -114,7 +114,7 @@ bool TizenImpl::wheelUp(int amount, const int durationMs)
 {
     LOG_F(INFO, "wheel up %d for %d", amount, durationMs);
     auto args = std::make_tuple(this);
-    long result;
+    long result = -1;
     for (int i = 0; i < amount; i++){
         result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{
                 TizenImpl *obj;
@@ -131,7 +131,7 @@ bool TizenImpl::wheelDown(int amount, const int durationMs)
 {
     LOG_F(INFO, "wheel down %d for %d", amount, durationMs);
     auto args = std::make_tuple(this);
-    long result;
+    long result = -1;
     for (int i = 0; i < amount; i++){
         result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{
                 TizenImpl *obj;