From: DoHyun Pyun Date: Mon, 17 Dec 2018 09:45:30 +0000 (+0900) Subject: Fix 64bit dlog format error X-Git-Tag: accepted/tizen/unified/20181218.063134^0 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fconnectivity%2Fbluetooth-agent.git;a=commitdiff_plain;h=3bec4f00764a97e8cb39a859a844d9dbdc646224 Fix 64bit dlog format error Change-Id: I64bece27714e8d36bd9cb72d0d12fa2c26026858 Signed-off-by: DoHyun Pyun --- diff --git a/ag-agent/bluetooth-ag-agent.c b/ag-agent/bluetooth-ag-agent.c index a1f9d0b..de197e7 100644 --- a/ag-agent/bluetooth-ag-agent.c +++ b/ag-agent/bluetooth-ag-agent.c @@ -2466,7 +2466,7 @@ static void __bt_ag_agent_print_at_buffer(char *message, const char *buf) i++; } if (message) - INFO("%s Buffer = [%s], Len(%d)", message, s, strlen(s)); + INFO("%s Buffer = [%s], Len(%zd)", message, s, strlen(s)); else INFO("[%s]", s); } @@ -2496,7 +2496,7 @@ static int __bt_ag_send_at_valist(bt_ag_info_t *hdset, va_list list, count = vsnprintf(rsp_buffer, sizeof(rsp_buffer), list_format, list); if (count < 0) { - ERR("count is %d", count); + ERR("count is %zd", count); return -EINVAL; } diff --git a/hf-agent/bluetooth-hf-agent.c b/hf-agent/bluetooth-hf-agent.c index fa15018..1dc8812 100644 --- a/hf-agent/bluetooth-hf-agent.c +++ b/hf-agent/bluetooth-hf-agent.c @@ -309,7 +309,7 @@ done: i++; } if (message) - INFO("%s Buffer = %s, Length = %d ", message, s, strlen(s)); + INFO("%s Buffer = %s, Length = %zd ", message, s, strlen(s)); else INFO("%s", s); } @@ -2298,7 +2298,7 @@ static gboolean __bt_hf_send_only_without_queue(bt_hf_agent_info_t *bt_hf_info, g_io_channel_flush(io_chan, NULL); if (count > 2 && data[2] == 'D') { /* ATDXXXXX */ - INFO("[HF AT CMD] Send only without queue <<<<<: Buffer = %s, Length = %d ", + INFO("[HF AT CMD] Send only without queue <<<<<: Buffer = %s, Length = %zd ", "ATDXXXXXXX", count); snprintf(prev_cmd, BT_HF_CMD_BUF_SIZE, "%s", data); } else { @@ -2333,14 +2333,14 @@ static gboolean __bt_hf_send_only(bt_hf_agent_info_t *bt_hf_info, gchar *data, g_io_channel_flush(io_chan, NULL); if (count > 2 && data[2] == 'D') /* ATDXXXXX */ - INFO("[HF AT CMD] Send only <<<<<: Buffer = %s, Length = %d ", + INFO("[HF AT CMD] Send only <<<<<: Buffer = %s, Length = %zd ", "ATDXXXXXXX", count); else __bt_hf_agent_print_at_buffer("[HF AT CMD] Send only <<<<<:", data); send_flag++; - DBG("Ref %d(after) on Send only buffer size =[%d] - Send <<<<<", + DBG("Ref %d(after) on Send only buffer size =[%zd] - Send <<<<<", send_flag, count); return TRUE; } @@ -2416,7 +2416,7 @@ static gboolean __bt_hf_send_and_read(bt_hf_agent_info_t *bt_hf_info, if (p.revents & POLLIN) { rd_size = read(fd, resp_buf, toread); resp_buf[rd_size] = '\0'; - DBG_SECURE("size = %d, Buffer=[%s]", rd_size, resp_buf); + DBG_SECURE("size = %zd, Buffer=[%s]", rd_size, resp_buf); recvd_ok = NULL != strstr(resp_buf, BT_HF_OK_RESPONSE); recvd_error = NULL != strstr(resp_buf, BT_HF_ERROR_RESPONSE); recvd_sec_error = NULL != strstr(resp_buf, BT_HF_SEC_ERROR_RESPONSE); diff --git a/map-agent/bluetooth_map_agent.c b/map-agent/bluetooth_map_agent.c index 978a6e7..a8a2311 100644 --- a/map-agent/bluetooth_map_agent.c +++ b/map-agent/bluetooth_map_agent.c @@ -431,7 +431,7 @@ guint64 _bt_add_id(int uid, int msg_type) DBG("Add id: %d, MsgType:%d", uid, msg_type); test = _bt_validate_uid(uid, msg_type); - DBG("test: %llx\n", test); + DBG("test: %llu\n", (unsigned long long int)test); if (test) return test; @@ -442,7 +442,7 @@ guint64 _bt_add_id(int uid, int msg_type) info->map_id = map_id; info->uid = uid; info->msg_type = msg_type; - DBG("map_id = %llx, uid = %d, MsgType=%d", info->map_id, info->uid, msg_type); + DBG("map_id = %llu, uid = %d, MsgType=%d", (unsigned long long int)info->map_id, info->uid, msg_type); id_list = g_slist_append(id_list, info); diff --git a/map-agent/bluetooth_map_email.c b/map-agent/bluetooth_map_email.c index 09edbfb..82d1a60 100644 --- a/map-agent/bluetooth_map_email.c +++ b/map-agent/bluetooth_map_email.c @@ -254,7 +254,7 @@ static void __bt_email_subscription_callback(GDBusConnection *connection, old_folder = __bt_email_get_path(mailbox_from->mailbox_type); handle = _bt_add_id(mailid, BT_MAP_ID_EMAIL); - DBG("[MessageDeleted] Handle:%llu", handle); + DBG("[MessageDeleted] Handle:%llu", (unsigned long long int)handle); _bt_mns_client_event_notify("MessageShift", handle, "TELECOM/MSG/DELETED", old_folder, "EMAIL"); g_free(old_folder); @@ -273,7 +273,7 @@ static void __bt_email_subscription_callback(GDBusConnection *connection, break; handle = _bt_add_id(mailid, BT_MAP_ID_EMAIL); - DBG("[SendingSuccess] Handle:%llu", handle); + DBG("[SendingSuccess] Handle:%llu", (unsigned long long int)handle); _bt_mns_client_event_notify("MessageShift", handle, "TELECOM/MSG/SENT", "TELECOM/MSG/OUTBOX", "EMAIL"); @@ -421,7 +421,7 @@ static message_info_t *__bt_email_info_get(email_mail_list_item_t *email_struct, #else snprintf(email_handle, sizeof(email_handle), "%llx", uid); #endif - DBG("******* MAP ID:%llu, MailID:%d **********", uid, email_struct->mail_id); + DBG("******* MAP ID:%llu, MailID:%d **********", (unsigned long long int)uid, email_struct->mail_id); email_info->handle = g_strdup(email_handle); dptime = email_struct->date_time; @@ -1073,7 +1073,7 @@ gboolean _bt_map_push_email_data(struct bmsg_data *bmsg_info, gboolean send = FALSE; char *mailto = NULL; - DBG("Length of Folder String: %d", strlen(bmsg_info->folder)); + DBG("Length of Folder String: %zd", strlen(bmsg_info->folder)); if (strlen(bmsg_info->folder) == 0) { DBG("No Folder Info. Default to OUTBOX"); bmsg_info->folder = g_strdup(folder); diff --git a/map-agent/bluetooth_map_sms.c b/map-agent/bluetooth_map_sms.c index eba780b..c79ad50 100644 --- a/map-agent/bluetooth_map_sms.c +++ b/map-agent/bluetooth_map_sms.c @@ -598,7 +598,7 @@ gboolean _bt_map_push_sms_data(struct bmsg_data *bmsg_info, GSList *recepients = NULL; gboolean send = FALSE; - DBG("Length of Folder String: %d", strlen(bmsg_info->folder)); + DBG("Length of Folder String: %zd", strlen(bmsg_info->folder)); if (strlen(bmsg_info->folder) == 0) { DBG("No Folder Info. Default to OUTBOX"); bmsg_info->folder = g_strdup(folder); @@ -896,7 +896,7 @@ static message_info_t *__bt_message_info_get(msg_struct_t msg_struct_handle, #else snprintf(msg_handle, sizeof(msg_handle), "%llx", uid); #endif - DBG("HANDLE: %s, MAP Id: %llu, MSG ID:%d", msg_handle, uid, msg_id); + DBG("HANDLE: %s, MAP Id: %llu, MSG ID:%d", msg_handle, (unsigned long long int)uid, msg_id); msg_info->handle = g_strdup(msg_handle); msg = msg_create_struct(MSG_STRUCT_MESSAGE_INFO); @@ -1102,7 +1102,7 @@ gboolean _bt_map_get_sms_message_list(gchar *folder, guint16 max, goto fail; local_count = (guint64)msg_list.nCount; - DBG("msg_list.nCount: %d, count:%llu", msg_list.nCount, local_count); + DBG("msg_list.nCount: %d, count:%llu", msg_list.nCount, (unsigned long long int)local_count); for (i = 0; i < local_count; i++) { msg_get_bool_value(msg_list.msg_struct_info[i], MSG_MESSAGE_READ_BOOL, &read); @@ -1112,7 +1112,7 @@ gboolean _bt_map_get_sms_message_list(gchar *folder, guint16 max, } } - DBG("count = %llx, newmsg = %d, max = %d", local_count, *newmsg, max); + DBG("count = %llu, newmsg = %d, max = %d", (unsigned long long int)local_count, *newmsg, max); for (i = 0, msg_count = 0; i < local_count && msg_count < max; i++) { message_info_t *msg_info; diff --git a/pb-agent/bluetooth_pb_agent.c b/pb-agent/bluetooth_pb_agent.c index 176d810..5daecde 100644 --- a/pb-agent/bluetooth_pb_agent.c +++ b/pb-agent/bluetooth_pb_agent.c @@ -482,7 +482,7 @@ static GVariant *__bt_pb_get_phonebook(PbAgentData *agent, const char *name, GVariantBuilder *vcards; INFO("name: %s filter: %lld format: %d max_list_count: %d list_start_offset: %d\n", - name, filter, format, max_list_count, list_start_offset); + name, (unsigned long long int)filter, format, max_list_count, list_start_offset); __bluetooth_pb_agent_timeout_add_seconds(agent); @@ -616,7 +616,7 @@ static GVariant *__bt_pb_get_phonebook_entry(PbAgentData *agent, const gchar *attr = NULL; DBG_SECURE("folder: %s id: %s filter: %llu format: %d\n", - folder, id, filter, format); + folder, id, (unsigned long long int)filter, format); __bluetooth_pb_agent_timeout_add_seconds(agent); diff --git a/pb-agent/bluetooth_pb_vcard.c b/pb-agent/bluetooth_pb_vcard.c index ac43ef7..1b0cc34 100644 --- a/pb-agent/bluetooth_pb_vcard.c +++ b/pb-agent/bluetooth_pb_vcard.c @@ -1678,7 +1678,7 @@ static gchar *__bluetooth_pb_vcard_real_contact_valist_v21(gint person_id, if (f == 0) f = ~f; - DBG("filter[%llu]\n", filter); + DBG("filter[%llu]\n", (unsigned long long int)filter); str = g_string_new("BEGIN:VCARD\r\nVERSION:2.1\r\n");