Change type casting using intptr_t 48/279048/1
authorsooyeon <sooyeon.kim@samsung.com>
Mon, 1 Aug 2022 06:11:23 +0000 (15:11 +0900)
committersooyeon <sooyeon.kim@samsung.com>
Mon, 1 Aug 2022 06:11:23 +0000 (15:11 +0900)
Change-Id: I596abafd51aa4af3e537b0df561b40c50cfcbc52
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
server/vcd_tidl.c

index b7ed0b9..e4a7426 100644 (file)
@@ -1383,7 +1383,8 @@ int __mgr_tidl_close_connection()
  */
 static void __widget_on_connected(rpc_port_proxy_vcd_widget_proxy_vcd_widget_h h, void *user_data)
 {
-       widget_tidl_info_s* widget_tidl_info = vcd_client_widget_get_tidl_info((int)user_data);
+       int pid = (intptr_t)user_data;
+       widget_tidl_info_s* widget_tidl_info = vcd_client_widget_get_tidl_info(pid);
 
        widget_tidl_info->connected = true;
        widget_tidl_info->connection_requesting = false;
@@ -1393,7 +1394,8 @@ static void __widget_on_connected(rpc_port_proxy_vcd_widget_proxy_vcd_widget_h h
 
 static void __widget_on_disconnected(rpc_port_proxy_vcd_widget_proxy_vcd_widget_h h, void *user_data)
 {
-       widget_tidl_info_s* widget_tidl_info = vcd_client_widget_get_tidl_info((int)user_data);
+       int pid = (intptr_t)user_data;
+       widget_tidl_info_s* widget_tidl_info = vcd_client_widget_get_tidl_info(pid);
 
        widget_tidl_info->connected = false;
        widget_tidl_info->connection_requesting = false;
@@ -1403,7 +1405,8 @@ static void __widget_on_disconnected(rpc_port_proxy_vcd_widget_proxy_vcd_widget_
 
 static void __widget_on_rejected(rpc_port_proxy_vcd_widget_proxy_vcd_widget_h h, void *user_data)
 {
-       widget_tidl_info_s* widget_tidl_info = vcd_client_widget_get_tidl_info((int)user_data);
+       int pid = (intptr_t)user_data;
+       widget_tidl_info_s* widget_tidl_info = vcd_client_widget_get_tidl_info(pid);
 
        widget_tidl_info->connection_requesting = false;
 
@@ -1420,7 +1423,8 @@ static rpc_port_proxy_vcd_widget_proxy_vcd_widget_h __widget_create_rpc_port(con
        };
 
        rpc_port_proxy_vcd_widget_proxy_vcd_widget_h handle = NULL;
-       if (0 != rpc_port_proxy_vcd_widget_proxy_vcd_widget_create(engine_app_id, &rpc_callback, (void *)pid, &handle)) {
+       intptr_t ptr_pid = pid;
+       if (0 != rpc_port_proxy_vcd_widget_proxy_vcd_widget_create(engine_app_id, &rpc_callback, (void *)ptr_pid, &handle)) {
                SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to create proxy");
                return NULL;
        }