From bd84ecc5e2ae52f869cd62e01ccb3cbd54f869d1 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Mon, 29 Jun 2020 14:41:37 +0900 Subject: [PATCH] libaurum: fix a build failure for 64-bit architecture this patch fixes a build failure while casting void* type return value to int. even thought there isn't any chance to lose anything for 'result' variable. because the range of the actual value is between 32bit integer range. Change-Id: Ib336314dbac4d9d22d593030ce0be986c07c2521 --- libaurum/src/DeviceImpl/TizenImpl.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libaurum/src/DeviceImpl/TizenImpl.cc b/libaurum/src/DeviceImpl/TizenImpl.cc index 67f224d..8f2def6 100644 --- a/libaurum/src/DeviceImpl/TizenImpl.cc +++ b/libaurum/src/DeviceImpl/TizenImpl.cc @@ -57,7 +57,7 @@ int TizenImpl::touchDown(const int x, const int y) LOG_F(INFO, "touch down %d %d , seq:%d", x, y, seq); if (seq >= 0) { auto args = std::make_tuple(this, x, y, seq); - int result = (int)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ + long result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ TizenImpl *obj; int x, y, seq; std::tie(obj, x, y, seq) = *static_cast*>(data); @@ -79,7 +79,7 @@ bool TizenImpl::touchMove(const int x, const int y, const int seq) LOG_F(INFO, "touch move %d %d, seq:%d", x, y, seq); if (seq >= 0) { auto args = std::make_tuple(this, x, y, seq); - int result = (int)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ + long result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ TizenImpl *obj; int x, y, seq; std::tie(obj, x, y, seq) = *static_cast*>(data); @@ -98,7 +98,7 @@ bool TizenImpl::touchUp(const int x, const int y, const int seq) LOG_F(INFO, "touch up %d %d, seq:%d", x, y, seq); if (seq >= 0) { auto args = std::make_tuple(this, x, y, seq); - int result = (int)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ + long result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ TizenImpl *obj; int x, y, seq; std::tie(obj, x, y, seq) = *static_cast*>(data); @@ -114,9 +114,9 @@ bool TizenImpl::wheelUp(int amount, const int durationMs) { LOG_F(INFO, "wheel up %d for %d", amount, durationMs); auto args = std::make_tuple(this); - int result; + long result; for (int i = 0; i < amount; i++){ - result = (int)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ + result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ TizenImpl *obj; std::tie(obj) = *static_cast*>(data); return (void*)efl_util_input_generate_wheel(obj->mFakeWheelHandle, EFL_UTIL_INPUT_POINTER_WHEEL_HORZ, 1); @@ -131,9 +131,9 @@ bool TizenImpl::wheelDown(int amount, const int durationMs) { LOG_F(INFO, "wheel down %d for %d", amount, durationMs); auto args = std::make_tuple(this); - int result; + long result; for (int i = 0; i < amount; i++){ - result = (int)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ + result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ TizenImpl *obj; std::tie(obj) = *static_cast*>(data); return (void*)efl_util_input_generate_wheel(obj->mFakeWheelHandle, EFL_UTIL_INPUT_POINTER_WHEEL_HORZ, -1); @@ -252,7 +252,7 @@ bool TizenImpl::strokeKeyCode(std::string keycode, unsigned int intv) bool TizenImpl::pressKeyCode(std::string keycode) { auto args = std::make_tuple(this, keycode); - int result = (int)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ + long result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ TizenImpl *obj; std::string keycode; std::tie(obj, keycode) = *static_cast*>(data); @@ -265,7 +265,7 @@ bool TizenImpl::pressKeyCode(std::string keycode) bool TizenImpl::releaseKeyCode(std::string keycode) { auto args = std::make_tuple(this, keycode); - int result = (int)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ + long result = (long)ecore_main_loop_thread_safe_call_sync([](void *data)->void*{ TizenImpl *obj; std::string keycode; std::tie(obj, keycode) = *static_cast*>(data); -- 2.7.4