Add the line coverage exception 12/109812/1 tizen_3.0.m2 submit/tizen_3.0.m2/20170112.014513
authorLee Hyuk <hyuk0512.lee@samsung.com>
Thu, 12 Jan 2017 01:35:26 +0000 (10:35 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 12 Jan 2017 01:43:44 +0000 (10:43 +0900)
Change-Id: I9a7a6fe8461fd57b76fea6e896376e9264a56a44
Signed-off-by: Lee Hyuk <hyuk0512.lee@samsung.com>
src/bluetooth-adapter.c
src/bluetooth-audio.c
src/bluetooth-avrcp.c
src/bluetooth-common.c
src/bluetooth-device.c
src/bluetooth-gatt.c
src/bluetooth-proximity.c

index 49dae006357e584bf0b0daaec54b029ad54d7051..999fbba20b5a3f2841497b0aff55e3c85302668e 100644 (file)
@@ -160,14 +160,14 @@ int bt_adapter_get_address(char **address)
 
        error_code = _bt_get_error_code(bluetooth_get_local_address(&loc_address));
        if (error_code != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code),
+               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), /* LCOV_EXCL_LINE */
                                        error_code); /* LCOV_EXCL_LINE */
                return error_code; /* LCOV_EXCL_LINE */
        }
 
        error_code = _bt_convert_address_to_string(address, &loc_address);
        if (error_code != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code),
+               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error_code), /* LCOV_EXCL_LINE */
                                        error_code); /* LCOV_EXCL_LINE */
                return error_code; /* LCOV_EXCL_LINE */
        }
@@ -441,14 +441,14 @@ int bt_adapter_get_name(char **name)
 
        ret = _bt_get_error_code(bluetooth_get_local_name(&loc_name));
        if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
+               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), /* LCOV_EXCL_LINE */
                                                ret); /* LCOV_EXCL_LINE */
                return ret; /* LCOV_EXCL_LINE */
        }
 
        *name = strdup(loc_name.name);
        if (*name == NULL) {
-               BT_ERR("OUT_OF_MEMORY(0x%08x)",
+               BT_ERR("OUT_OF_MEMORY(0x%08x)", /* LCOV_EXCL_LINE */
                                BT_ERROR_OUT_OF_MEMORY); /* LCOV_EXCL_LINE */
                return BT_ERROR_OUT_OF_MEMORY;
        }
@@ -470,7 +470,7 @@ int bt_adapter_set_name(const char *name)
 
        ret = _bt_get_error_code(bluetooth_set_local_name(&loc_name));
        if (ret != BT_ERROR_NONE) { /* LCOV_EXCL_LINE */
-               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret),
+               BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), /* LCOV_EXCL_LINE */
                                                ret); /* LCOV_EXCL_LINE */
        } /* LCOV_EXCL_LINE */
 
@@ -617,14 +617,14 @@ int bt_adapter_foreach_bonded_device(bt_adapter_bonded_device_cb foreach_cb,
 
        dev_list = g_ptr_array_new();
        if (dev_list == NULL) {
-               BT_ERR("OUT_OF_MEMORY(0x%08x)",
+               BT_ERR("OUT_OF_MEMORY(0x%08x)", /* LCOV_EXCL_LINE */
                                BT_ERROR_OUT_OF_MEMORY); /* LCOV_EXCL_LINE */
                return BT_ERROR_OUT_OF_MEMORY;
        }
 
        ret = _bt_get_error_code(bluetooth_get_bonded_device_list(&dev_list));
        if (ret != BT_ERROR_NONE) {
-               BT_ERR("%s(0x%08x) : Failed to get bonded device list",
+               BT_ERR("%s(0x%08x) : Failed to get bonded device list", /* LCOV_EXCL_LINE */
                _bt_convert_error_to_string(ret), ret); /* LCOV_EXCL_LINE */
                return ret;
        }
@@ -635,7 +635,7 @@ int bt_adapter_foreach_bonded_device(bt_adapter_bonded_device_cb foreach_cb,
                        ret = _bt_get_bt_device_info_s(&dev_info,
                                        (bluetooth_device_info_t *)ptr);
                        if (ret != BT_ERROR_NONE) {
-                               BT_ERR("%s(0x%08x) : Failed to get device info",
+                               BT_ERR("%s(0x%08x) : Failed to get device info", /* LCOV_EXCL_LINE */
                                        _bt_convert_error_to_string(ret),
                                        ret); /* LCOV_EXCL_LINE */
                                break;
@@ -647,7 +647,7 @@ int bt_adapter_foreach_bonded_device(bt_adapter_bonded_device_cb foreach_cb,
                        }
                        _bt_free_bt_device_info_s(dev_info); /* LCOV_EXCL_LINE */
                } else {
-                       BT_ERR("OPERATION_FAILED(0x%08x)",
+                       BT_ERR("OPERATION_FAILED(0x%08x)", /* LCOV_EXCL_LINE */
                        BT_ERROR_OPERATION_FAILED); /* LCOV_EXCL_LINE */
                        ret = BT_ERROR_OPERATION_FAILED;
                        break;
@@ -736,6 +736,7 @@ int bt_adapter_is_service_used(const char *service_uuid, bool *used)
        return ret;
 }
 
+/* LCOV_EXCL_START */
 int bt_adapter_foreach_profile_connected_devices(const char *profile_uuid,
        bt_adapter_profile_connected_devices_cb callback, void *user_data)
 {
@@ -797,7 +798,7 @@ int bt_adapter_foreach_profile_connected_devices(const char *profile_uuid,
        g_ptr_array_free(addr_list, TRUE);
 
        return ret;
-}
+} /* LCOV_EXCL_STOP */
 
 int bt_adapter_set_state_changed_cb(bt_adapter_state_changed_cb callback,
                                                        void *user_data)
@@ -1518,7 +1519,6 @@ int bt_adapter_le_set_scan_mode(bt_adapter_le_scan_mode_e scan_mode)
        } /* LCOV_EXCL_LINE */
        return ret;
 }
-/* LCOV_EXCL_STOP */
 
 int bt_adapter_le_set_customized_scan_mode(float scan_interval, float scan_window)
 {
@@ -1536,7 +1536,7 @@ int bt_adapter_le_set_customized_scan_mode(float scan_interval, float scan_windo
                BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(ret), ret);
 
        return ret;
-}
+} /* LCOV_EXCL_STOP */
 
 int bt_adapter_le_create_advertiser(bt_advertiser_h *advertiser)
 {
index 64b640dc095f6f24218d19a7efbdfb588f31659e..5115a73488eac88b43fa9bed3f7f0102e07ee420 100644 (file)
@@ -599,7 +599,6 @@ int bt_ag_notify_call_list(bt_call_list_h list)
 
        return error;
 }
-/* LCOV_EXCL_STOP */
 
 int bt_ag_notify_vendor_cmd(const char *command)
 {
@@ -615,7 +614,7 @@ int bt_ag_notify_vendor_cmd(const char *command)
        if (error != BT_ERROR_NONE)
                BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
        return error;
-}
+} /* LCOV_EXCL_STOP */
 
 int bt_ag_notify_voice_recognition_state(bool state)
 {
index 9da615c67a229cff84b26a9b814e3890f3eb45a8..6a73b44593ad5b27fd2fba91938659e67d075742 100644 (file)
@@ -59,15 +59,17 @@ int __bt_check_avrcp_target_init_status(void)
                return BT_ERROR_NOT_INITIALIZED; \
        }
 
+/* LCOV_EXCL_START */
 int __bt_check_avrcp_control_init_status(void)
 {
-       if (is_avrcp_control_initialized != true) {
+       if (is_avrcp_control_initialized != true) { /* LCOV_EXCL_LINE */
                BT_ERR("NOT_INITIALIZED(0x%08x)", BT_ERROR_NOT_INITIALIZED); /* LCOV_EXCL_LINE */
                return BT_ERROR_NOT_INITIALIZED; /* LCOV_EXCL_LINE */
        }
 
        return BT_ERROR_NONE;
 }
+/* LCOV_EXCL_STOP */
 
 /*The below API is just to conver the error from Audio API's to CAPI error codes,
 * this is temporary change and changes to proper error code will be done in
@@ -108,6 +110,7 @@ int bt_avrcp_target_initialize(bt_avrcp_target_connection_state_changed_cb callb
        return BT_ERROR_NONE;
 }
 
+/* LCOV_EXCL_START */
 int bt_avrcp_target_connect(const char *remote_address)
 {
        int error;
@@ -144,7 +147,7 @@ int bt_avrcp_target_disconnect(const char *remote_address)
                BT_ERR("%s(0x%08x)", _bt_convert_error_to_string(error), error);
 
        return error;
-}
+} /* LCOV_EXCL_STOP */
 
 int bt_avrcp_target_deinitialize(void)
 {
index bfb7327153896eada3d1f34b47b5fc35ebd02a2a..a1c30474420ed69a2b8f9e88ae70a29f14cb915a 100644 (file)
@@ -2229,7 +2229,6 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                }
                break;
        }
-/* LCOV_EXCL_STOP */
        case BLUETOOTH_EVENT_GATT_CLIENT_SERVICE_CHANGED: {
                bt_gatt_service_change_t *service_change =
                        (bt_gatt_service_change_t *)(param->param_data);
@@ -2305,6 +2304,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                }
                break;
        }
+/* LCOV_EXCL_STOP */
        case BLUETOOTH_EVENT_ADVERTISING_STARTED:
                BT_INFO("BLUETOOTH_EVENT_ADVERTISING_STARTED");
                adv_handle = (int *)(param->param_data);
@@ -2882,7 +2882,7 @@ static void __bt_free_bt_adapter_device_discovery_info_s(bt_adapter_device_disco
        free(discovery_info);
        discovery_info = NULL;
 }
-/* LCOV_EXCL_STOP */
+
 static int __bt_get_bt_adapter_le_device_scan_info_s(
                        bt_adapter_le_device_scan_result_info_s **scan_info,
                        bluetooth_le_device_info_t *source_info)
@@ -2936,7 +2936,7 @@ static void __bt_free_bt_adapter_le_device_scan_info_s(bt_adapter_le_device_scan
 
        free(scan_info);
        scan_info = NULL;
-}
+} /* LCOV_EXCL_STOP */
 
 /* LCOV_EXCL_START */
 #if !defined(TIZEN_PROFILE_WEARABLE) && !defined(TIZEN_PROFILE_IVI)
index 08999eca8c1666897645993f90a779e4f7279f8f..94fc70023f22fba9edcb53a105ba083e39eb4271 100644 (file)
@@ -388,13 +388,14 @@ int bt_device_unset_connection_state_changed_cb(void)
        return BT_ERROR_NONE;
 }
 
+/* LCOV_EXCL_START */
 int bt_device_unset_rssi_alert_cb(void)
 {
        BT_CHECK_SUPPORTED_FEATURE(BT_FEATURE_COMMON);
        BT_CHECK_INIT_STATUS();
        _bt_unset_cb(BT_EVENT_RSSI_ALERT_EVENT);
        return BT_ERROR_NONE;
-}
+} /* LCOV_EXCL_STOP */
 
 int bt_device_unset_att_mtu_changed_cb(void)
 {
@@ -404,6 +405,7 @@ int bt_device_unset_att_mtu_changed_cb(void)
        return BT_ERROR_NONE;
 }
 
+/* LCOV_EXCL_START */
 int bt_device_enable_rssi_monitor(const char *remote_address,
                                bt_device_connection_link_type_e link_type,
                                int low_threshold, int in_range_threshold,
@@ -481,7 +483,6 @@ int bt_device_get_rssi_strength(const char *remote_address,
 }
 
 
-/* LCOV_EXCL_START */
 int bt_device_le_conn_update(const char *device_address,
        const bt_le_conn_update_s *parameters)
 {
index f790f01fbcf9eaebf53ce3a720a2ab5fc7b0d66c..4be75effe17d7693b8353cff18693549444e21e0 100644 (file)
@@ -969,6 +969,7 @@ static void __bt_gatt_destroy_service(bt_gatt_h gatt_handle)
        __bt_gatt_free_service(gatt_handle);
 }
 
+/* LCOV_EXCL_START */
 static int __convert_int_to_signed_bits(int i, int size)
 {
        if (i < 0)
@@ -1067,6 +1068,7 @@ static int __get_data_type_int_size(bt_data_type_int_e format)
                return 0;
        }
 }
+/* LCOV_EXCL_STOP */
 
 int bt_gatt_destroy(bt_gatt_h gatt_handle)
 {
index dffcbf1c4450b57f18aec669f85239a0fe743c2c..8e88796744733682df3851d3195c49a003934313 100644 (file)
@@ -138,7 +138,7 @@ int bt_proximity_reporter_destroy(bt_proximity_reporter_h reporter)
 
        return error_code;
 }
-
+/* LCOV_EXCL_START */
 int _bt_check_proximity_is_initialized(bool *is_initialized)
 {
        BT_CHECK_GATT_PXP_SUPPORT();
@@ -152,7 +152,7 @@ int _bt_check_proximity_is_initialized(bool *is_initialized)
 
        return BT_ERROR_NONE;
 }
-
+/* LCOV_EXCL_STOP */
 static bt_proximity_monitor_s *_bt_proximity_minotr_find(const char *remote_address)
 {
        GSList *l;
@@ -165,7 +165,7 @@ static bt_proximity_monitor_s *_bt_proximity_minotr_find(const char *remote_addr
        }
        return NULL;
 }
-
+/* LCOV_EXCL_START */
 int _bt_proximity_connection_set_state_changed(int result, const char *remote_address, bool connected)
 {
        int service_type = 0;
@@ -202,7 +202,7 @@ int _bt_proximity_connection_set_state_changed(int result, const char *remote_ad
        }
        return error_code;
 }
-
+/* LCOV_EXCL_STOP */
 int bt_proximity_monitor_create(const char *remote_address, bt_proximity_monitor_h *monitor)
 {
        int error_code = BT_ERROR_NONE;
@@ -296,7 +296,7 @@ int bt_proximity_monitor_connect(bt_proximity_monitor_h monitor)
        BT_CHECK_GATT_PXP_SUPPORT();
        BT_CHECK_INIT_STATUS();
        BT_CHECK_INPUT_PARAMETER(monitor_s);
-
+/* LCOV_EXCL_START */
        if (_bt_proximity_minotr_find(monitor_s->remote_address) == NULL)
                return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
 
@@ -307,7 +307,7 @@ int bt_proximity_monitor_connect(bt_proximity_monitor_h monitor)
 
        return error_code;
 }
-
+/* LCOV_EXCL_STOP */
 int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor)
 {
        int error_code;
@@ -316,7 +316,7 @@ int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor)
        BT_CHECK_GATT_PXP_SUPPORT();
        BT_CHECK_INIT_STATUS();
        BT_CHECK_INPUT_PARAMETER(monitor_s);
-
+/* LCOV_EXCL_START */
        if (_bt_proximity_minotr_find(monitor_s->remote_address) == NULL)
                return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
 
@@ -327,7 +327,7 @@ int bt_proximity_monitor_disconnect(bt_proximity_monitor_h monitor)
 
        return error_code;
 }
-
+/* LCOV_EXCL_STOP */
 int bt_proximity_monitor_set_connection_state_changed_cb(bt_proximity_monitor_h monitor,
                                bt_proximity_monitor_connection_state_changed_cb callback, void *user_data)
 {
@@ -437,14 +437,14 @@ int bt_proximity_monitor_set_linkloss_alert(bt_proximity_monitor_h monitor, int
        BT_CHECK_GATT_PXP_SUPPORT();
        BT_CHECK_INIT_STATUS();
        BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */
-
+/* LCOV_EXCL_START */
        if (_bt_proximity_minotr_find(monitor_s->remote_address) == NULL)
                return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
 
        if (!(pxp_monitor_supported_services & BT_PROXIMITY_LINKLOSS_ALERT))
                return BT_ERROR_NOT_SUPPORTED;
 
-       _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); /* LCOV_EXCL_LINE */
+       _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address);
 
        error_code = _bt_get_error_code(bluetooth_proximity_monitor_set_property(&addr_hex,
                                                BT_PROXIMITY_LINKLOSS_ALERT, value));
@@ -453,7 +453,7 @@ int bt_proximity_monitor_set_linkloss_alert(bt_proximity_monitor_h monitor, int
 
        return error_code;
 }
-
+/* LCOV_EXCL_STOP */
 int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int value)
 {
        int error_code = BT_ERROR_NONE;
@@ -463,14 +463,14 @@ int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int
        BT_CHECK_GATT_PXP_SUPPORT();
        BT_CHECK_INIT_STATUS();
        BT_CHECK_INPUT_PARAMETER(monitor); /* LCOV_EXCL_LINE */
-
+/* LCOV_EXCL_START */
        if (_bt_proximity_minotr_find(monitor_s->remote_address) == NULL)
                return BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED;
 
        if (!(pxp_monitor_supported_services & BT_PROXIMITY_IMMEDIATE_ALERT))
                return BT_ERROR_NOT_SUPPORTED;
 
-       _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address); /* LCOV_EXCL_LINE */
+       _bt_convert_address_to_hex(&addr_hex, monitor_s->remote_address);
 
        error_code = _bt_get_error_code(bluetooth_proximity_monitor_set_property(&addr_hex,
                                                BT_PROXIMITY_IMMEDIATE_ALERT, value));
@@ -479,7 +479,7 @@ int bt_proximity_monitor_set_immediate_alert(bt_proximity_monitor_h monitor, int
 
        return error_code;
 }
-
+/* LCOV_EXCL_STOP */
 int bt_proximity_monitor_get_linkloss_alert(bt_proximity_monitor_h monitor, int *value)
 {
        int error_code = BT_ERROR_NONE;