From: Youngjae Cho Date: Wed, 28 Jul 2021 05:10:32 +0000 (+0900) Subject: Fix warning of converting pointer from integer X-Git-Tag: accepted/tizen/unified/20210804.085711~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F71%2F261871%2F1;p=platform%2Fcore%2Fapi%2Fdevice.git Fix warning of converting pointer from integer warning: cast to pointer from integer of different size The above warning is only generated in 64bit compile environment. Change-Id: Idffb00ec61ac9029f94ceca14c13882b7ac33fdf Signed-off-by: Youngjae Cho --- diff --git a/src/callback.c b/src/callback.c index f19d785..76c43d4 100644 --- a/src/callback.c +++ b/src/callback.c @@ -53,7 +53,7 @@ static void battery_capacity_cb(keynode_t *key, void *data) /* invoke the each callback with value */ SYS_G_LIST_FOREACH_SAFE(device_cb_list[type], elem, elem_next, cb_info) - cb_info->cb(type, (void*)val, cb_info->data); + cb_info->cb(type, (void*)(intptr_t)val, cb_info->data); } //LCOV_EXCL_STOP @@ -69,7 +69,7 @@ static void battery_charging_cb(keynode_t *key, void *data) /* invoke the each callback with value */ SYS_G_LIST_FOREACH_SAFE(device_cb_list[type], elem, elem_next, cb_info) - cb_info->cb(type, (void*)val, cb_info->data); + cb_info->cb(type, (void*)(intptr_t)val, cb_info->data); } //LCOV_EXCL_STOP @@ -98,7 +98,7 @@ static void battery_level_cb(keynode_t *key, void *data) /* invoke the each callback with value */ SYS_G_LIST_FOREACH_SAFE(device_cb_list[type], elem, elem_next, cb_info) - cb_info->cb(type, (void*)status, cb_info->data); + cb_info->cb(type, (void*)(intptr_t)status, cb_info->data); } //LCOV_EXCL_STOP @@ -156,7 +156,7 @@ static void flash_state_cb(GDBusConnection *conn, /* invoke the each callback with value */ SYS_G_LIST_FOREACH_SAFE(device_cb_list[type], elem, elem_next, cb_info) - cb_info->cb(type, (void*)val, cb_info->data); + cb_info->cb(type, (void*)(intptr_t)val, cb_info->data); } //LCOV_EXCL_STOP diff --git a/src/haptic.c b/src/haptic.c index 6d99509..5f70397 100644 --- a/src/haptic.c +++ b/src/haptic.c @@ -303,7 +303,7 @@ int device_haptic_vibrate(haptic_device_h device_handle, int duration, int feedb return errno_to_device_error(ret_val); //LCOV_EXCL_LINE System Error if (effect_handle) - *effect_handle = (haptic_effect_h)val; + *effect_handle = (haptic_effect_h)(intptr_t)val; return DEVICE_ERROR_NONE; }