From: Wootak Jung Date: Thu, 2 Jul 2015 10:03:15 +0000 (+0900) Subject: Fix 64bit build error X-Git-Tag: accepted/tizen/mobile/20150708.070007^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Ftelephony%2Ftel-plugin-imc.git;a=commitdiff_plain;h=040b492e26d2083ac4b90d3474749902241f25d4 Fix 64bit build error Change-Id: I25b0aa01fbc206e906e99a41873480fc0e03a22b --- diff --git a/packaging/tel-plugin-imc.spec b/packaging/tel-plugin-imc.spec index 537b5c0..594ff34 100755 --- a/packaging/tel-plugin-imc.spec +++ b/packaging/tel-plugin-imc.spec @@ -1,6 +1,6 @@ %define major 0 %define minor 1 -%define patchlevel 85 +%define patchlevel 86 Name: tel-plugin-imc Version: %{major}.%{minor}.%{patchlevel} diff --git a/src/imc_phonebook.c b/src/imc_phonebook.c index 32db9a4..c676a0c 100644 --- a/src/imc_phonebook.c +++ b/src/imc_phonebook.c @@ -76,8 +76,8 @@ typedef struct { *****************************************************************************/ static gint __phonebook_compare_index(gconstpointer a, gconstpointer b) { - guint index1 = (guint)a; - guint index2 = (guint)b; + guint index1 = GPOINTER_TO_UINT(a); + guint index2 = GPOINTER_TO_UINT(b); return index1 - index2; } @@ -213,7 +213,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co, * Check if 'index' is already available (UPDATE operation). */ while (list) { - if ((guint)list->data == req_index) { + if (GPOINTER_TO_UINT(list->data) == req_index) { /* * index 'present', no need to update */ @@ -233,7 +233,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co, case PB_TYPE_FDN: private_info->used_index_fdn = g_slist_insert_sorted( private_info->used_index_fdn, - (gpointer)req_index, + GUINT_TO_POINTER(req_index), __phonebook_compare_index); /* Update Phonebook list valid */ @@ -244,7 +244,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co, case PB_TYPE_ADN: private_info->used_index_adn = g_slist_insert_sorted( private_info->used_index_adn, - (gpointer)req_index, + GUINT_TO_POINTER(req_index), __phonebook_compare_index); /* Update Phonebook list valid */ @@ -255,7 +255,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co, case PB_TYPE_SDN: private_info->used_index_sdn = g_slist_insert_sorted( private_info->used_index_sdn, - (gpointer)req_index, + GUINT_TO_POINTER(req_index), __phonebook_compare_index); /* Update Phonebook list valid */ @@ -266,7 +266,7 @@ static gboolean __phonebook_update_index_list_by_type(CoreObject *co, case PB_TYPE_USIM: private_info->used_index_usim = g_slist_insert_sorted( private_info->used_index_usim, - (gpointer)req_index, + GUINT_TO_POINTER(req_index), __phonebook_compare_index); /* Update Phonebook list valid */ @@ -336,9 +336,9 @@ static void __phonebook_check_used_index(CoreObject *co, } /* Use first used_index in case req_index is not used */ - *used_index = (guint)g_slist_nth_data(list, VAL_ZERO); + *used_index = GPOINTER_TO_UINT(g_slist_nth_data(list, VAL_ZERO)); while (list) { - if ((guint)list->data == req_index) { + if (GPOINTER_TO_UINT(list->data) == req_index) { /* * req_index is equal to one of used_index */ @@ -587,7 +587,7 @@ static void __on_resp_phonebook_get_used_index(TcorePending *p, if (temp) { /* Insert used_index in PrivateInfo sorted in ascending */ *list = g_slist_insert_sorted(*list, - (gpointer)atoi(temp), + GUINT_TO_POINTER(atoi(temp)), __phonebook_compare_index); } tcore_at_tok_free(tokens); @@ -1130,10 +1130,10 @@ static void on_resp_read_record(TcorePending *p, if (__phonebook_get_index_list_by_type(co, req_data->phonebook_type, &list) == TRUE) { while (list) { - if ((guint)list->data == resp_read_record.index) { + if (GPOINTER_TO_UINT(list->data) == resp_read_record.index) { if ((list = g_slist_next(list)) != NULL) { /* If exist, set next_index */ - resp_read_record.next_index = (guint)list->data; + resp_read_record.next_index = GPOINTER_TO_UINT(list->data); dbg("next_index is [%u]", resp_read_record.next_index); } else { /* read_record.index is the end of used_index */ @@ -1295,7 +1295,7 @@ static void on_resp_delete_record(TcorePending *p, err("used_index list is NOT valid"); } else { const int del_index = (const int)req_data->index; - list = g_slist_remove(list, (gconstpointer)del_index); + list = g_slist_remove(list, GUINT_TO_POINTER(del_index)); dbg("Remove index: [%u] list: [0x%x]", req_data->index, list); } } else { diff --git a/src/imc_sim.c b/src/imc_sim.c index b057b9e..8f15453 100644 --- a/src/imc_sim.c +++ b/src/imc_sim.c @@ -4272,7 +4272,7 @@ static TReturn imc_transmit_apdu(CoreObject *o, UserRequest *ur) result = util_byte_to_hex((const char *)req_data->apdu, apdu, req_data->apdu_length); dbg("result %d", result); - cmd_str = g_strdup_printf("AT+CSIM=%d, \"%s\"", strlen(apdu), apdu); + cmd_str = g_strdup_printf("AT+CSIM=%d, \"%s\"", (unsigned int)strlen(apdu), apdu); ret = tcore_prepare_and_send_at_request(o, cmd_str, "+CSIM:", TCORE_AT_SINGLELINE, ur, diff --git a/src/imc_sms.c b/src/imc_sms.c index 3b6a9e2..0b5671f 100644 --- a/src/imc_sms.c +++ b/src/imc_sms.c @@ -661,7 +661,7 @@ int data_len, const void *data, void *user_data) struct tresp_sms_delete_msg delMsgInfo = {0, }; UserRequest *ur = NULL; const TcoreATResponse *atResp = data; - int index = (int) user_data; + int index = GPOINTER_TO_INT(user_data); dbg(" Func Entrance");