Fixed dlog format string check 88/185588/1 submit/tizen/20180801.080227
authorAmit Purwar <amit.purwar@samsung.com>
Wed, 1 Aug 2018 03:49:03 +0000 (09:19 +0530)
committerAmit Purwar <amit.purwar@samsung.com>
Wed, 1 Aug 2018 03:49:26 +0000 (09:19 +0530)
Change-Id: I19042d4c5b68285c4c17b9ec30771a1d0365a88c
Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
src/bluetooth-adapter.c
src/bluetooth-device.c
src/bluetooth-otp.c
src/bluetooth-tds.c

index e2605b4d56e808b35d3610f1d0e9d4d77b9dddac..a219ce984ba9a0a185b8a3b582b2dcc5c74ea59a 100644 (file)
@@ -257,7 +257,7 @@ int bt_adapter_get_local_info(char **chipset, char **firmware,
                fseek(fp, 0, SEEK_END);
                lsize = ftell(fp);
                if (lsize < 0) {
-                       BT_ERR("ftell() error(0x%x)", lsize);
+                       BT_ERR("ftell() error(0x%lx)", lsize);
                        ret = BT_ERROR_OPERATION_FAILED;
                        goto ERROR;
                }
@@ -277,20 +277,20 @@ int bt_adapter_get_local_info(char **chipset, char **firmware,
 
                info_start = strstr(buf, "bluetooth");
                if (info_start == NULL) {
-                       BT_ERR("strstr() error(0x%x)", info_start);
+                       BT_ERR("strstr() error(%s)", info_start);
                        ret = BT_ERROR_OPERATION_FAILED;
                        goto ERROR;
                }
                info_start += 10;
                info_end = strstr(buf, "hcd");
                if (info_end == NULL) {
-                       BT_ERR("strstr() error(0x%x)", info_end);
+                       BT_ERR("strstr() error(%s)", info_end);
                        ret = BT_ERROR_OPERATION_FAILED;
                        goto ERROR;
                }
                info_size = info_end - info_start - 1;
                if (info_size < 0) {
-                       BT_ERR("info_size is invalid(%d)", info_size);
+                       BT_ERR("info_size is invalid(%ld)", info_size);
                        ret = BT_ERROR_OPERATION_FAILED;
                        goto ERROR;
                }
@@ -308,7 +308,7 @@ int bt_adapter_get_local_info(char **chipset, char **firmware,
 
                info_end = strchr(buf, '_');
                if (info_end == NULL) {
-                       BT_ERR("strchr() error(0x%x)", info_end);
+                       BT_ERR("strchr() error(%s)", info_end);
                        ret = BT_ERROR_OPERATION_FAILED;
                        goto ERROR;
                }
@@ -340,7 +340,7 @@ int bt_adapter_get_local_info(char **chipset, char **firmware,
        fseek(fp, 0, SEEK_END);
        lsize = ftell(fp);
        if (lsize < 0) {
-               BT_ERR("ftell() error(0x%x)", lsize);
+               BT_ERR("ftell() error(0x%lx)", lsize);
                ret = BT_ERROR_OPERATION_FAILED;
                goto ERROR;
        }
@@ -363,7 +363,7 @@ int bt_adapter_get_local_info(char **chipset, char **firmware,
        info_start = buf;
        info_end = strchr(buf, ',');
        if (info_end == NULL) {
-               BT_ERR("strchr() error(0x%x)", info_end);
+               BT_ERR("strchr() error(%s)", info_end);
                ret = BT_ERROR_OPERATION_FAILED;
                goto ERROR;
        }
index 3d751210d422cfa44cb1a0e29eb975d55c925044..cb879d0dcb5ae5dd3541c786a64a9d4e798e73d7 100644 (file)
@@ -694,8 +694,8 @@ int bt_device_get_service_mask_from_uuid_list(char **uuids,
        }
 
        *service_mask_list = service_mask;
-       BT_DBG("service_mask = %x, service_mask_list = %x", service_mask,
-              service_mask_list);
+       BT_DBG("service_mask = %x, service_mask_list = %x", (int)service_mask,
+              (int)service_mask_list);
 
        return BT_ERROR_NONE;
 }
index b2a96c92ba8c8724bc098ebae8d851785454ba6b..82b9fa60dd1a5c3da50325fa6cc0b50733da8b7c 100644 (file)
@@ -510,7 +510,7 @@ static int __bt_update_otp_server_data(bluetooth_device_address_t *address, bt_o
 
        ret = bluetooth_gatt_get_service_from_uuid(address, BT_OTP_SERVICE_UUID, &service);
        if (ret != BLUETOOTH_ERROR_NONE) {
-               BT_ERR("Failed to find OTP service on the remote device [%s]", address);
+               BT_ERR("Failed to find OTP service on the remote device [%s]", address->addr);
                return ret;
        }
 
@@ -1027,7 +1027,7 @@ void _bt_otp_client_read_value_response(int result, char *char_path,
                                                                (uint64_t)(value[6] & 0xFF) << 8        |
                                                                (uint64_t)(value[7] & 0xFF);
                        otp_client_s->otp_feature = feature;
-                       BT_INFO("OTP Feature [%u]", feature);
+                       BT_INFO("OTP Feature [%llu]", feature);
 
                        if (BT_OTP_IS_OACP_SUPPORTED(otp_client_s->otp_feature)
                                                                && !otp_client_s->oacp_cccd_enabled
@@ -1099,7 +1099,7 @@ void _bt_otp_client_read_value_response(int result, char *char_path,
                                                        (uint32_t)(value[5] & 0xFF) << 8        |
                                                        (uint32_t)(value[4] & 0xFF);
 
-                       BT_INFO("Object Size curr[%lu] alloc[%lu]", csize, asize);
+                       BT_INFO("Object Size curr[%u] alloc[%u]", csize, asize);
 
                        if (otp_client_s->curr_op == BT_OTP_OBJECT_DISCOVERY) {
                                metadata->curr_size = csize;
@@ -1118,7 +1118,7 @@ void _bt_otp_client_read_value_response(int result, char *char_path,
                                                (uint32_t)(value[2] & 0xFF) << 16       |
                                                (uint32_t)(value[1] & 0xFF) << 8        |
                                                (uint32_t)(value[0] & 0xFF);
-                       BT_INFO("Object Properties [%lu]", props);
+                       BT_INFO("Object Properties [%u]", props);
 
                        /* First-created & Last-modified are optional charcacteristics */
                        if (otp_client_s->curr_op == BT_OTP_OBJECT_DISCOVERY) {
@@ -1641,7 +1641,7 @@ olcp_done:
                                (uint64_t)(info->data[3] & 0xFF) << 16 |
                                (uint64_t)(info->data[2] & 0xFF) << 8  |
                                (uint64_t)(info->data[1] & 0xFF);
-               BT_INFO("Changed occurred to object id %u", id);
+               BT_INFO("Changed occurred to object id %llu", id);
        }
 }
 
@@ -1888,7 +1888,7 @@ static gboolean __client_data_received_cb(GIOChannel *chan, GIOCondition cond,
        if (oacp_read_op->length <= oacp_read_op->size) {
                written = fwrite(buffer, 1, len, oacp_read_op->fp);
                oacp_read_op->length += written;
-               BT_DBG("written [%d], length_sofar [%lu], received_buff_len [%d], size [%lu]",
+               BT_DBG("written [%d], length_sofar [%u], received_buff_len [%d], size [%u]",
                                        written, oacp_read_op->length, len, oacp_read_op->size);
        }
 
@@ -2142,7 +2142,7 @@ int bt_otp_client_read_object_contents(bt_otp_client_h otp_client,
        uint32_t offset = 0;
        uint32_t length = object_info->curr_size;
 
-       BT_INFO("Object ID [%llu],Offset [%lu], Length [%lu], curr_size [%lu]",
+       BT_INFO("Object ID [%llu],Offset [%u], Length [%u], curr_size [%u]",
                                obj_id, offset, length, object_info->curr_size);
        uint8_t value[9] = {0x00};
 
@@ -2408,10 +2408,8 @@ int bt_otp_client_write_object(bt_otp_client_h otp_client,
 
        size = (uint32_t)st.st_size;
 
-       BT_INFO("Filepath [%s], Size[%llu]",
-                                                       file_path, size);
-       BT_INFO("offset[%llu], length[%llu], mode[%u]",
-                                                               offset, length, mode);
+       BT_INFO("Filepath [%s], Size[%u]", file_path, size);
+       BT_INFO("offset[%u], length[%u], mode[%u]", offset, length, mode);
 
        oacp_write_op = g_malloc0(sizeof(bt_otp_client_write_op));
        oacp_write_op->size = size;
index a373cba3940495037d58ef5892d3efc7948c5578..0d6670662d8c8ff76fbf5c0e4cd75fdf28ee9efc 100644 (file)
@@ -463,7 +463,7 @@ void _bt_tds_control_point_indication_response_update(const char *address, bluet
 
                /* DEBUG */
                for (k = 0; k < info->tds_data.length; k++)
-                       BT_DBG("Data[%d] [0x%x]", info->tds_data.data[k]);
+                       BT_DBG("Data[%d] [0x%x]", k, info->tds_data.data[k]);
 
                if (seeker_s->tds_activation_ongoing == true) {
                        (seeker_s)->tds_activation_ongoing = false;