From: DoHyun Pyun Date: Mon, 17 Dec 2018 08:04:48 +0000 (+0900) Subject: Fix dlog format error X-Git-Tag: accepted/tizen/unified/20181218.063056^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=190b018dffc42f5c36936016477ffe33c6df5a66;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Fix dlog format error Change-Id: I1c1fcaf6f78e4a0946c86adbdc456b6439f5e395 Signed-off-by: DoHyun Pyun --- diff --git a/bt-api/bt-common.c b/bt-api/bt-common.c index 6992b7c..93d4b41 100644 --- a/bt-api/bt-common.c +++ b/bt-api/bt-common.c @@ -1551,7 +1551,7 @@ int _bt_discover_service_uuids(char *address, char *remote_uuid) } else { g_variant_get(ret, "(v)", &value); uuid_value = (char **)g_variant_get_strv(value, &size); - BT_DBG("Size items %d", size); + BT_DBG("Size items %zd", size); } if (uuid_value) { diff --git a/bt-api/bt-event-handler.c b/bt-api/bt-event-handler.c index 99476d7..810984a 100644 --- a/bt-api/bt-event-handler.c +++ b/bt-api/bt-event-handler.c @@ -2125,7 +2125,7 @@ void __bt_map_client_event_filter(GDBusConnection *connection, folders_struct.size = g_variant_iter_n_children(iter); folders_struct.names = (char**) g_malloc0(folders_struct.size * sizeof(*(folders_struct.names))); - BT_DBG("g_variant_iter_n_children: %d", folders_struct.size); + BT_DBG("g_variant_iter_n_children: %lli", (long long int)folders_struct.size); GVariantIter* res = NULL; int i = 0; while (g_variant_iter_loop(iter, "a{sv}", &res)) { @@ -2210,7 +2210,7 @@ void __bt_map_client_event_filter(GDBusConnection *connection, messages_struct.size = g_variant_iter_n_children(iter); messages_struct.message_items = (bt_map_client_message_item_t*) g_malloc(messages_struct.size * sizeof(*(messages_struct.message_items))); - BT_DBG("g_variant_iter_n_children: %d", messages_struct.size); + BT_DBG("g_variant_iter_n_children: %lli", (long long int)messages_struct.size); char *object = NULL; GVariantIter *properites = NULL; @@ -2280,7 +2280,7 @@ void __bt_map_client_event_filter(GDBusConnection *connection, } else if (strcmp(key, "Size") == 0) { g_variant_get(value, "t", &value_int); messages_struct.message_items[i].size = value_int; - BT_DBG(" Size: %d", value_int); + BT_DBG(" Size: %llu", (unsigned long long int)value_int); } else if (strcmp(key, "Text") == 0) { g_variant_get(value, "b", &value_bool); messages_struct.message_items[i].is_text = value_bool ? 1 : 0; @@ -2292,7 +2292,7 @@ void __bt_map_client_event_filter(GDBusConnection *connection, } else if (strcmp(key, "AttachmentSize") == 0) { g_variant_get(value, "t", &value_int); messages_struct.message_items[i].attachment_size = value_int; - BT_DBG(" AttachmentSize: %d", value_int); + BT_DBG(" AttachmentSize: %llu", (unsigned long long int)value_int); } else if (strcmp(key, "Priority") == 0) { g_variant_get(value, "b", &value_bool); messages_struct.message_items[i].is_priority = value_bool ? 1 : 0; @@ -2478,7 +2478,7 @@ void __bt_pbap_client_event_filter(GDBusConnection *connection, for (i = 0; i < count; i++) BT_DBG("%s", list[i]); - BT_DBG("address: %s, result: %d, count: %d, success: %d", + BT_DBG("address: %s, result: %d, count: %zd, success: %d", address, result, count, success); _bt_convert_addr_string_to_type(vc_list.btaddr.addr, diff --git a/bt-api/bt-gatt-client.c b/bt-api/bt-gatt-client.c index 929c4a0..a473a37 100755 --- a/bt-api/bt-gatt-client.c +++ b/bt-api/bt-gatt-client.c @@ -2196,7 +2196,7 @@ static gboolean bluetooth_gatt_client_notify_channel_watch_cb(GIOChannel *gio, if (len > 0 && len < chr_info->mtu) { bt_gatt_char_property_t char_val; - BT_INFO("FD io sending value changed %x %x %x %x %x %x %x %d \n", buffer[0], buffer[1], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], len); + BT_INFO("FD io sending value changed %x %x %x %x %x %x %x %zd \n", buffer[0], buffer[1], buffer[3], buffer[4], buffer[5], buffer[6], buffer[7], len); memcpy(char_val.prop.uuid, chr_info->UUID, 16); diff --git a/bt-api/bt-gatt-service.c b/bt-api/bt-gatt-service.c index 3670f20..22c8ea4 100644 --- a/bt-api/bt-gatt-service.c +++ b/bt-api/bt-gatt-service.c @@ -3285,7 +3285,7 @@ static gboolean bluetooth_gatt_server_acquire_channel_write_cb(GIOChannel *gio, if (len > 0) { - BT_INFO(" FD io sending value changed %s %d \n", buffer, len); + BT_INFO(" FD io sending value changed %s %zd \n", buffer, len); bluetooth_gatt_server_write_requested_info_t write_info; diff --git a/bt-api/bt-hdp.c b/bt-api/bt-hdp.c index 0684a34..f8f0fad 100755 --- a/bt-api/bt-hdp.c +++ b/bt-api/bt-hdp.c @@ -199,7 +199,7 @@ static gboolean __bt_hdp_internal_data_received(GIOChannel *gio, return FALSE; } - BT_DBG("fd: %d, len: %d, buffer: %s", fd, len, buff); + BT_DBG("fd: %d, len: %zd, buffer: %s", fd, len, buff); user_info = _bt_get_user_data(BT_COMMON); if (user_info->cb) { diff --git a/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c b/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c index 835d8f8..1ced5f7 100644 --- a/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c +++ b/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c @@ -676,7 +676,7 @@ static gboolean __bt_adapter_all_properties_cb(gpointer user_data) if (size > 2) { DBG("Send Adapter properties changed event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } done: @@ -798,7 +798,7 @@ static gboolean __bt_adapter_discovery_timeout_cb(gpointer user_data) if (size > 2) { DBG("Send Adapter Properties changed event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } done: @@ -894,7 +894,7 @@ static gboolean __bt_adapter_scan_mode_cb(gpointer user_data) if (size > 2) { DBG("Send Adapter Properties changed event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } done: @@ -1026,7 +1026,7 @@ static gboolean __bt_adapter_local_version_cb(gpointer user_data) if (size > 2) { DBG("Send Adapter Properties changed event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } done: @@ -1116,7 +1116,7 @@ static gboolean __bt_adapter_local_name_cb(gpointer user_data) if (size > 2) { DBG("Send Adapter Properties changed event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } done: @@ -1211,7 +1211,7 @@ static gboolean __bt_adapter_local_address_cb(gpointer user_data) if (size > 1) { DBG("Send Device found event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } done: @@ -1327,7 +1327,7 @@ static gboolean __bt_adapter_service_uuids_cb(gpointer user_data) if (size > 2) { DBG("Send Adapter properties changed event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } done: @@ -1342,7 +1342,7 @@ fail: ev->status = BT_STATUS_FAIL; ev->num_props = 0; DBG("Send Adapter properties changed event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } @@ -1439,7 +1439,7 @@ static gboolean __bt_adapter_bonded_devices_cb(gpointer user_data) ev->num_props = 0; ev->status = BT_STATUS_SUCCESS; - INFO("Size [%d]", size); + INFO("Size [%zd]", size); /* signature of GetManagedObjects: a{oa{sa{sv}}} */ g_variant_get(result, "(a{oa{sa{sv}}})", &iter); @@ -1487,7 +1487,7 @@ static gboolean __bt_adapter_bonded_devices_cb(gpointer user_data) if (size > 2) { DBG("Send Adapter properties changed event to HAL user," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, (void*) buf, size); } done: diff --git a/bt-oal/bluez_hal/src/bt-hal-agent.c b/bt-oal/bluez_hal/src/bt-hal-agent.c index ccab259..fc15cf8 100644 --- a/bt-oal/bluez_hal/src/bt-hal-agent.c +++ b/bt-oal/bluez_hal/src/bt-hal-agent.c @@ -478,7 +478,7 @@ static void __bt_hal_send_ssp_request_events(const gchar *address, { struct hal_ev_ssp_request ev; memset(&ev, 0, sizeof(ev)); - DBG("sizeof ev [%d]", sizeof(ev)); + DBG("sizeof ev [%zu]", sizeof(ev)); DBG("Remote Device address [%s]", address); DBG("Remote Device Name [%s]", name); diff --git a/bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.c b/bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.c index c9a7812..2fac142 100644 --- a/bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.c +++ b/bt-oal/bluez_hal/src/bt-hal-dbus-common-utils.c @@ -1747,7 +1747,7 @@ int _bt_hal_discover_service_uuids(char *address, char *remote_uuid) if (size > 0) { uuid_value = (char **)g_variant_get_strv(temp_value, &size); - DBG("Size items %d", size); + DBG("Size items %zu", size); } if (temp_value) diff --git a/bt-oal/bluez_hal/src/bt-hal-device-dbus-handler.c b/bt-oal/bluez_hal/src/bt-hal-device-dbus-handler.c index 1c86b8a..3ffb6a7 100644 --- a/bt-oal/bluez_hal/src/bt-hal-device-dbus-handler.c +++ b/bt-oal/bluez_hal/src/bt-hal-device-dbus-handler.c @@ -566,7 +566,7 @@ done: ev->num_props = 0; size = sizeof(*ev); ERR("Error: Failed to get Remote device properties after SDP," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_REMOTE_DEVICE_PROPS, (void*) buf, size); cleanup: @@ -633,7 +633,7 @@ static void __bt_device_parse_services(GVariant *result) } DBG("Send Remote Device services to HAL," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_REMOTE_DEVICE_PROPS, (void*) buf, size); g_variant_unref(result); @@ -978,12 +978,12 @@ static gboolean __bt_device_bonded_device_info_cb(gpointer user_data) ev->num_props = 0; size = sizeof(*ev); DBG("Send Remote Device properties event to HAL," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_REMOTE_DEVICE_PROPS, (void*) buf, size); } else { if (size > 2) { DBG("Send Remote Device properties event to HAL," - " Num Prop [%d] total size [%d]", ev->num_props, size); + " Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_REMOTE_DEVICE_PROPS, (void*) buf, size); } } diff --git a/bt-oal/bluez_hal/src/bt-hal-event-receiver.c b/bt-oal/bluez_hal/src/bt-hal-event-receiver.c index a634552..0f69377 100644 --- a/bt-oal/bluez_hal/src/bt-hal-event-receiver.c +++ b/bt-oal/bluez_hal/src/bt-hal-event-receiver.c @@ -475,7 +475,7 @@ static void __bt_hal_adapter_property_changed_event(GVariant *msg) if (size > 2) { - DBG("Send Adapter properties changed event to HAL user, Num Prop [%d] total size [%d]", ev->num_props, size); + DBG("Send Adapter properties changed event to HAL user, Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_ADAPTER_PROPS_CHANGED, buf, size); } @@ -530,7 +530,7 @@ void _bt_hal_handle_adapter_event(GVariant *msg, const char *member) g_variant_get(msg, "(siii)", &address, &link_type, &alert_type, &rssi_dbm); DBG("RSSI Alert: [Address %s LinkType %d] [Type %d DBM %d]", - address, alert_type, rssi_dbm); + address, alert_type, rssi_dbm, link_type); _bt_hal_convert_addr_string_to_type(ev.bdaddr, address); ev.link_type = link_type; @@ -660,7 +660,7 @@ static gboolean __bt_hal_parse_device_properties(GVariant *item) gsize size1 = 0; int i = 0; size1 = g_variant_get_size(val); - DBG("UUID count from size [%d]\n", size1); + DBG("UUID count from size [%zu]\n", size1); int num_props_tmp = ev->num_props; if (size1 > 0) { @@ -703,7 +703,7 @@ static gboolean __bt_hal_parse_device_properties(GVariant *item) DBG("-"); if (size > 1) { - DBG("Send Device found event to HAL user, Num Prop [%d] total size [%d]", ev->num_props, size); + DBG("Send Device found event to HAL user, Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_DEVICE_FOUND, (void*) buf, size); } @@ -1796,7 +1796,7 @@ static void __bt_hal_device_properties_lookup(GVariant *result, char *address) ERR("result is NULL\n"); } if (size > 1) { - DBG("Send Device found event to HAL user, Num Prop [%d] total size [%d]", ev->num_props, size); + DBG("Send Device found event to HAL user, Num Prop [%d] total size [%zd]", ev->num_props, size); event_cb(HAL_EV_DEVICE_FOUND, (void*) buf, size); } DBG("-"); @@ -2083,7 +2083,7 @@ static void __bt_hal_handle_adv_report(GVariant *msg, const char *path) memcpy(ev->adv_data, buffer, data_len); size += data_len; - DBG("Send le scan result event to HAL, size: [%d]", size); + DBG("Send le scan result event to HAL, size: [%zd]", size); gatt_event_cb(HAL_EV_GATT_CLIENT_SCAN_RESULT, buf, size); g_variant_unref(value); } @@ -2183,7 +2183,7 @@ static void __bt_avrcp_control_parse_properties(struct hal_ev_track_changed *ev, long int val; val = g_variant_get_uint32(value); - DBG("Value : %d", val); + DBG("Value : %li", val); ev->attr[i].attr_id = HAL_MEDIA_ATTR_ID_PLAYING_TIME; snprintf((char*)ev->attr[i].text, HAL_MAX_ATTR_STR_LEN, "%ld", val); i++; @@ -2191,7 +2191,7 @@ static void __bt_avrcp_control_parse_properties(struct hal_ev_track_changed *ev, long int val; val = g_variant_get_uint32(value); - DBG("Value : %d", val); + DBG("Value : %li", val); ev->attr[i].attr_id = HAL_MEDIA_ATTR_ID_NUM_TRACKS; snprintf((char*)ev->attr[i].text, HAL_MAX_ATTR_STR_LEN, "%ld", val); i++; @@ -2199,7 +2199,7 @@ static void __bt_avrcp_control_parse_properties(struct hal_ev_track_changed *ev, long int val; val = g_variant_get_uint32(value); - DBG("Value : %d", val); + DBG("Value : %li", val); ev->attr[i].attr_id = HAL_MEDIA_ATTR_ID_TRACK_NUM; snprintf((char*)ev->attr[i].text, HAL_MAX_ATTR_STR_LEN, "%ld", val); i++; diff --git a/bt-oal/bluez_hal/src/bt-hal-gap-agent.c b/bt-oal/bluez_hal/src/bt-hal-gap-agent.c index 6ce95a1..9a9f804 100644 --- a/bt-oal/bluez_hal/src/bt-hal-gap-agent.c +++ b/bt-oal/bluez_hal/src/bt-hal-gap-agent.c @@ -754,7 +754,7 @@ static void __bt_gap_agent_method(GDBusConnection *connection, if (sender == NULL) return; - DBG("Cancelled : agent %p sender %s", sender); + DBG("Cancelled : agent %p sender %p", priv, sender); /* Need to check if (g_strcmp0(sender, agent->busname) != 0) return; diff --git a/bt-oal/bluez_hal/src/bt-hal-gatt-server.c b/bt-oal/bluez_hal/src/bt-hal-gatt-server.c index b2313dd..a45aad0 100644 --- a/bt-oal/bluez_hal/src/bt-hal-gatt-server.c +++ b/bt-oal/bluez_hal/src/bt-hal-gatt-server.c @@ -3104,7 +3104,7 @@ static bt_status_t gatt_server_send_response(int conn_id, int trans_id, /* DEBUG */ for (i = 0; i < response->attr_value.len; i++) - DBG("Resonse [%d] = [0x%x]", response->attr_value.value[i]); + DBG("Resonse [%d] = [0x%x]", i, response->attr_value.value[i]); if (req_info->request_type == BT_HAL_GATT_REQUEST_TYPE_READ) { GVariantBuilder *inner_builder = NULL; diff --git a/bt-oal/bluez_hal/src/bt-hal-hdp-dbus-handler.c b/bt-oal/bluez_hal/src/bt-hal-hdp-dbus-handler.c index f31aa9b..9bf3321 100644 --- a/bt-oal/bluez_hal/src/bt-hal-hdp-dbus-handler.c +++ b/bt-oal/bluez_hal/src/bt-hal-hdp-dbus-handler.c @@ -723,7 +723,7 @@ static void __hdp_connect_request_cb(GDBusProxy *hdp_proxy, app = __get_hdp_app_by_id(conn_info->app_id); if (!app) { - ERR("No app with app_id: %d exists"); + ERR("No app with app_id: %d exists", conn_info->app_id); __hdp_free_conn_info(conn_info); return; } @@ -867,7 +867,7 @@ bt_status_t _bt_hal_dbus_handler_hdp_unregister_application(int app_id) DBG("app_id: %d", app_id); app = __get_hdp_app_by_id(app_id); if (!app) { - ERR("No app with app_id: %d exists"); + ERR("No app with app_id: %d exists", app_id); return BT_STATUS_PARM_INVALID; } diff --git a/bt-oal/bluez_hal/src/bt-hal-rfcomm-dbus-handler.c b/bt-oal/bluez_hal/src/bt-hal-rfcomm-dbus-handler.c index 3f8ab45..81f75c6 100644 --- a/bt-oal/bluez_hal/src/bt-hal-rfcomm-dbus-handler.c +++ b/bt-oal/bluez_hal/src/bt-hal-rfcomm-dbus-handler.c @@ -255,7 +255,7 @@ static gboolean app_event_cb(GIOChannel *io, GIOCondition cond, gpointer data) goto fail; } - DBG("len: %d", len); + DBG("len: %zu", len); if (0 == len) { ERR("Other end of socket is closed"); goto fail; @@ -878,7 +878,7 @@ static gboolean __server_event_cb(GIOChannel *io, GIOCondition cond, gpointer da goto fail; } - DBG("len: %d", len); + DBG("len: %zu", len); if (0 == len) { ERR("Other end of socket is closed"); goto fail; diff --git a/bt-oal/bluez_hal/src/bt-hal-socket.c b/bt-oal/bluez_hal/src/bt-hal-socket.c index c50a481..ac59bfb 100644 --- a/bt-oal/bluez_hal/src/bt-hal-socket.c +++ b/bt-oal/bluez_hal/src/bt-hal-socket.c @@ -49,7 +49,7 @@ static bt_status_t listen(btsock_type_t type, const char *service_name, return BT_STATUS_UNSUPPORTED; } - INFO("channel: %d, sock_fd: %d, type: %d", channel, sock_fd, type); + INFO("channel: %d, sock_fd: %d, type: %d", channel, *sock_fd, type); switch (type) { case BTSOCK_RFCOMM: @@ -97,7 +97,7 @@ static bt_status_t connect(const bt_bdaddr_t *bd_addr, btsock_type_t type, return BT_STATUS_UNSUPPORTED; } - INFO("channel: %d, sock_fd: %d, type: %d", channel, sock_fd, type); + INFO("channel: %d, sock_fd: %d, type: %d", channel, *sock_fd, type); switch (type) { case BTSOCK_RFCOMM: diff --git a/bt-oal/bluez_hal/src/bt-hal-utils.c b/bt-oal/bluez_hal/src/bt-hal-utils.c index 10ef16e..588af9f 100644 --- a/bt-oal/bluez_hal/src/bt-hal-utils.c +++ b/bt-oal/bluez_hal/src/bt-hal-utils.c @@ -947,7 +947,7 @@ char *_bt_convert_service_id_to_uuid_string(bt_service_id_t service_id) return g_strdup(BT_HAL_IOTIVITY_UUID); #endif default: - ERR("Unknwon Service id: %d, return NULL"); + ERR("Unknwon Service id: %d, return NULL", service_id); } DBG("-"); diff --git a/bt-oal/oal-adapter-mgr.c b/bt-oal/oal-adapter-mgr.c index ac4b48e..5384b61 100644 --- a/bt-oal/oal-adapter-mgr.c +++ b/bt-oal/oal-adapter-mgr.c @@ -904,7 +904,7 @@ static void cb_adapter_device_found(int num_properties, bt_property_t *propertie print_bt_properties(num_properties, properties); parse_device_properties(num_properties, properties, &dev_info, &adv_info); - BT_INFO("number of properties= [%d] ", num_properties, size); + BT_INFO("number of properties= [%d] ", num_properties); if (dev_info.type != DEV_TYPE_BREDR) { /* BLE Single or DUAL mode found, so it should have Adv data */ diff --git a/bt-oal/oal-device-mgr.c b/bt-oal/oal-device-mgr.c index 5bda10a..33ee984 100755 --- a/bt-oal/oal-device-mgr.c +++ b/bt-oal/oal-device-mgr.c @@ -591,7 +591,7 @@ void cb_device_properties(bt_status_t status, bt_bdaddr_t *bd_addr, case BT_PROPERTY_UUIDS: { event_dev_services_t *services_info; bt_uuid_t *uuids = (bt_uuid_t *) properties[0].val; - BT_INFO("Properties len [%d] event structure size [%d]", properties[0].len, sizeof(event_dev_services_t)); + BT_INFO("Properties len [%d] event structure size [%zu]", properties[0].len, sizeof(event_dev_services_t)); services_info = g_malloc(sizeof(event_dev_services_t) + properties[0].len); services_info->address = dev_info->address; diff --git a/bt-oal/oal-gatt.c b/bt-oal/oal-gatt.c index e0f3db5..9b01f22 100644 --- a/bt-oal/oal-gatt.c +++ b/bt-oal/oal-gatt.c @@ -809,7 +809,7 @@ oal_status_t gatts_get_att_mtu(int conn_id, int *mtu) ret = gatt_api->server->get_att_mtu(conn_id, mtu); if (ret != BT_STATUS_SUCCESS) { - BT_ERR("GATT MTU Size failed, status: %d", status2string(ret)); + BT_ERR("GATT MTU Size failed, status: %s", status2string(ret)); return convert_to_oal_status(ret); } diff --git a/bt-oal/oal-hid-host.c b/bt-oal/oal-hid-host.c index 94a90ba..0458b41 100755 --- a/bt-oal/oal-hid-host.c +++ b/bt-oal/oal-hid-host.c @@ -152,7 +152,7 @@ oal_status_t hid_set_report(bt_address_t *address, int ret; bdstr_t bdstr; - API_TRACE("len: %d", strlen(report)); + API_TRACE("len: %zd", strlen(report)); CHECK_OAL_HID_ENABLED(); OAL_CHECK_PARAMETER(address, return); OAL_CHECK_PARAMETER(report, return); diff --git a/bt-oal/oal-socket.c b/bt-oal/oal-socket.c index dbf0377..0d3fe43 100755 --- a/bt-oal/oal-socket.c +++ b/bt-oal/oal-socket.c @@ -359,7 +359,7 @@ int socket_connect(oal_sock_type_t sock_type, oal_uuid_t *p_uuid, int channel, b BTSOCK_RFCOMM, NULL, channel, &sock_fd, 0); break; default: - BT_ERR("Socket type: %d not supported"); + BT_ERR("Socket type: %d not supported", sock_type); } if (sock_fd < 0) { @@ -404,7 +404,7 @@ int socket_listen(oal_sock_type_t sock_type, oal_uuid_t *p_uuid, char *svc_name, svc_name, p_uuid->uuid, channel, &sock_fd, 0); break; default: - BT_ERR("Socket type: %d not supported"); + BT_ERR("Socket type: %d not supported", sock_type); } if (sock_fd < 0 || ret != BT_STATUS_SUCCESS) { diff --git a/bt-otp/bt-otpserver.c b/bt-otp/bt-otpserver.c index f44f487..c588be9 100644 --- a/bt-otp/bt-otpserver.c +++ b/bt-otp/bt-otpserver.c @@ -609,7 +609,7 @@ static gboolean __server_data_received_cb(GIOChannel *chan, GIOCondition cond, return TRUE; } - BT_DBG("Received data length %d, remote_addr = %s", len, remote_addr); + BT_DBG("Received data length %zu, remote_addr = %s", len, remote_addr); if (!oacp_op->fp) { char file_path[BT_FILE_PATH_MAX_LEN] = {0, }; @@ -636,7 +636,7 @@ static gboolean __server_data_received_cb(GIOChannel *chan, GIOCondition cond, if (oacp_op->length_sofar <= oacp_op->length) { written = fwrite(buffer, 1, len, oacp_op->fp); oacp_op->length_sofar += written; - BT_DBG("written [%d], length_sofar [%lu], received_buff_len [%d], size [%lu]", + BT_DBG("written [%d], length_sofar [%u], received_buff_len [%zu], size [%u]", written, oacp_op->length_sofar, len, oacp_op->length); } @@ -1331,7 +1331,7 @@ int _bt_otp_oacp_write_cb(char *value, int len, int offset, if (opcode == OACP_WRITE) mode = (uint8_t)value[9] & 0xFF; - BT_INFO("Offset = %lu, Length = %lu", object_offset, length, mode); + BT_INFO("Offset = %u, Length = %u", object_offset, length); if (oacp_op) { if (otc_connection_status) { @@ -1598,7 +1598,7 @@ int _bt_otp_olcp_write_cb(char *value, int len, int offset, (uint64_t)(value[3] & 0xFF) << 16 | (uint64_t)(value[2] & 0xFF) << 8 | (uint64_t)(value[1] & 0xFF); - BT_INFO("Object ID [%llu]", object_id); + BT_INFO("Object ID [%llu]", (unsigned long long int)object_id); if (selected_object && selected_object->id == object_id) goto fail; diff --git a/bt-service-adaptation/services/adapter/bt-service-core-adapter-le.c b/bt-service-adaptation/services/adapter/bt-service-core-adapter-le.c index 1a4ce66..5818f2d 100644 --- a/bt-service-adaptation/services/adapter/bt-service-core-adapter-le.c +++ b/bt-service-adaptation/services/adapter/bt-service-core-adapter-le.c @@ -844,7 +844,7 @@ static int __bt_le_state_handle_request(gboolean enable) break; } default: - BT_ERR("Unknown state: %d", _bt_adapter_get_le_status); + BT_ERR("Unknown state: %d", _bt_adapter_get_le_status()); break; } diff --git a/bt-service-adaptation/services/bt-service-event-receiver.c b/bt-service-adaptation/services/bt-service-event-receiver.c index f68ff80..b498b47 100644 --- a/bt-service-adaptation/services/bt-service-event-receiver.c +++ b/bt-service-adaptation/services/bt-service-event-receiver.c @@ -381,7 +381,7 @@ void _bt_service_oal_event_receiver(int event_type, gpointer event_data, gsize l { bt_service_oal_event_data_t *oal_event = g_new0(bt_service_oal_event_data_t, 1); - BT_INFO("event_type: [%d], data size: [%d]", event_type, len); + BT_INFO("event_type: [%d], data size: [%zu]", event_type, len); oal_event->type = event_type; if (event_data) diff --git a/bt-service-adaptation/services/bt-service-event-sender.c b/bt-service-adaptation/services/bt-service-event-sender.c index cfd3337..f3fb614 100644 --- a/bt-service-adaptation/services/bt-service-event-sender.c +++ b/bt-service-adaptation/services/bt-service-event-sender.c @@ -672,7 +672,7 @@ int _bt_send_hf_local_term_event(char *address) BT_HF_LOCAL_TERM_EVENT_INTERFACE, BT_HF_LOCAL_TERM, g_variant_new("s", address), &error)) { - BT_ERR("Error while sending Signal: %s", signal); + BT_ERR("Error while sending Signal: %s", address); if (error) { BT_ERR("Error Code [%d], Error Message [%s]", error->code, error->message); diff --git a/bt-service-adaptation/services/gatt/bt-service-gatt.c b/bt-service-adaptation/services/gatt/bt-service-gatt.c index 36d9474..0395d7c 100644 --- a/bt-service-adaptation/services/gatt/bt-service-gatt.c +++ b/bt-service-adaptation/services/gatt/bt-service-gatt.c @@ -2471,7 +2471,7 @@ int _bt_get_att_mtu(bluetooth_device_address_t *address, BT_INFO("GATT Client [%s] is connected, conn Id [%d] Instance ID [%d]", conn_info->addr, conn_info->connection_id, conn_info->instance_id); } else { - BT_ERR("GATT Client [%s] is not yet connected.."); + BT_ERR("GATT Client [%s] is not yet connected..", addr); return BLUETOOTH_ERROR_NOT_CONNECTED; } @@ -2689,13 +2689,13 @@ static void __bt_build_service_browse_info(int conn_id, memcpy(&uuid.uuid, &svc_info->uuid, BLUETOOTH_UUID_HEX_MAX_LEN); _bt_uuid_to_string(&uuid, uuid_string); - BT_INFO("Service UUID formed [%s] strlen [%d]", uuid_string, strlen(uuid_string)); + BT_INFO("Service UUID formed [%s] strlen [%zd]", uuid_string, strlen(uuid_string)); /* Fill UUID of service */ g_strlcpy(info->uuids[count], uuid_string, BLUETOOTH_UUID_STRING_MAX); - BT_INFO("Service UUID formed TO be sent [%s] strlen [%d]", + BT_INFO("Service UUID formed TO be sent [%s] strlen [%zd]", info->uuids[count], strlen(info->uuids[count])); /* Fill instance ID of service */ info->inst_id[count] = svc_info->inst_id; @@ -3563,7 +3563,7 @@ static void __bt_handle_client_descriptor_read_data( if (event_data->uuid_status.conn_status.status != OAL_STATUS_SUCCESS) result = BLUETOOTH_ERROR_INTERNAL; else { - BT_INFO("desc data len:", event_data->data_len); + BT_INFO("desc data len:%d", event_data->data_len); if (event_data->data_len > 0) { /* DEBUG */ for (i = 0; i < event_data->data_len; i++) diff --git a/bt-service-adaptation/services/pan_nap/bt-service-network.c b/bt-service-adaptation/services/pan_nap/bt-service-network.c index 03588e8..0fe178e 100644 --- a/bt-service-adaptation/services/pan_nap/bt-service-network.c +++ b/bt-service-adaptation/services/pan_nap/bt-service-network.c @@ -54,7 +54,7 @@ static connection_profile_h __bt_get_net_profile(void *connection, retv_if(connection == NULL, NULL); retv_if(address == NULL, NULL); - BT_DBG("net_conn: %x", connection); + BT_DBG("net_conn: %p", connection); _bt_util_addr_type_to_addr_net_string(net_address, address); diff --git a/bt-service-adaptation/services/socket/bt-service-socket.c b/bt-service-adaptation/services/socket/bt-service-socket.c index 240b66d..359488c 100644 --- a/bt-service-adaptation/services/socket/bt-service-socket.c +++ b/bt-service-adaptation/services/socket/bt-service-socket.c @@ -192,7 +192,7 @@ int _bt_socket_client_connect(int sock_type, char *address, sock_fd = socket_connect(OAL_SOCK_RFCOMM, &uuid, channel, &bd); break; default: - BT_ERR("Socket type: %d not supported"); + BT_ERR("Socket type: %d not supported", sock_type); return BLUETOOTH_ERROR_NOT_SUPPORT; } @@ -230,7 +230,7 @@ int _bt_socket_listen(int sock_type, char *svc_name, char *server_uuid, int chan sock_fd = socket_listen(OAL_SOCK_RFCOMM, &uuid, svc_name, channel); break; default: - BT_ERR("Socket type: %d not supported"); + BT_ERR("Socket type: %d not supported", sock_type); return BLUETOOTH_ERROR_NOT_SUPPORT; }