From 186f90974895761fb31d5558a2dfab717c3341a0 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Tue, 31 Jul 2018 09:27:25 +0900 Subject: [PATCH] Adjust the coverage exception section Change-Id: I660ff63d889f367d59dfdec58adb773c59da9459 Signed-off-by: DoHyun Pyun --- src/bluetooth-gatt.c | 33 ++++++++++++++++++--------------- src/bluetooth-otp.c | 1 + 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/bluetooth-gatt.c b/src/bluetooth-gatt.c index c3c323a..28e5df6 100644 --- a/src/bluetooth-gatt.c +++ b/src/bluetooth-gatt.c @@ -100,6 +100,7 @@ static void __bt_gatt_free_service(bt_gatt_h gatt_handle); #ifdef TIZEN_GATT_CLIENT static void __bt_gatt_free_service(bt_gatt_h gatt_handle); +/* LCOV_EXCL_START */ void __bt_string_to_uuid_hex(const char *str, unsigned char *uuid) { uint32_t uuid0, uuid4; @@ -125,7 +126,6 @@ void __bt_string_to_uuid_hex(const char *str, unsigned char *uuid) } #endif -/* LCOV_EXCL_START */ static int __bt_check_gatt_server_init_status(void) { if (is_gatt_server_initialized != true) { @@ -831,7 +831,6 @@ int bt_gatt_connect(const char *address, bool auto_connect) return ret; } #else -/* LCOV_EXCL_STOP */ int bt_gatt_connect(const char *address, bool auto_connect) { int ret; @@ -1187,6 +1186,7 @@ static int __get_data_type_int_size(bt_data_type_int_e format) } /* LCOV_EXCL_STOP */ +/* LCOV_EXCL_START */ int bt_gatt_destroy(bt_gatt_h gatt_handle) { bt_gatt_common_s *handle = (bt_gatt_common_s *)gatt_handle; @@ -1293,8 +1293,6 @@ int bt_gatt_descriptor_destroy(bt_gatt_h gatt_handle) return BT_ERROR_NONE; } -/* LCOV_EXCL_STOP */ - int bt_gatt_get_value(bt_gatt_h gatt_handle, char **value, int *value_length) { bt_gatt_common_s *handle = (bt_gatt_common_s *)gatt_handle; @@ -1761,6 +1759,7 @@ int bt_gatt_set_float_value(bt_gatt_h gatt_handle, bt_data_type_float_e type, return BT_ERROR_NONE; /* LCOV_EXCL_STOP */ } + /* LCOV_EXCL_START */ int bt_gatt_characteristic_get_permissions(bt_gatt_h gatt_handle, int *permissions) { @@ -1833,6 +1832,7 @@ int bt_gatt_set_permissions(bt_gatt_h gatt_handle, int permissions) return BT_ERROR_NONE; } /* LCOV_EXCL_STOP */ + int bt_gatt_get_uuid(bt_gatt_h gatt_handle, char **uuid) { bt_gatt_common_s *handle = (bt_gatt_common_s *)gatt_handle; @@ -2556,7 +2556,7 @@ int bt_gatt_descriptor_get_characteristic(bt_gatt_h descriptor, return BT_ERROR_NONE; } -/* LCOV_EXCL_START */ + int bt_gatt_server_initialize(void) { BT_CHECK_GATT_SUPPORT(); @@ -3387,7 +3387,6 @@ int bt_gatt_client_create(const char *remote_address, bt_gatt_client_h *client) return ret; /* LCOV_EXCL_STOP */ } #else -/* LCOV_EXCL_STOP */ int bt_gatt_client_create(const char *remote_address, bt_gatt_client_h *client) { int ret = BT_ERROR_NONE; @@ -3511,7 +3510,7 @@ static bool __bt_gatt_client_is_in_progress(void) return false; /* LCOV_EXCL_STOP */ } - +/* LCOV_EXCL_START */ void _handle_gatt_client_read_completed_event(int result, bt_gatt_resp_data_t *resp) { bt_gatt_common_s *handle; @@ -3614,8 +3613,9 @@ void _handle_gatt_client_write_completed_event(int result, bt_gatt_resp_data_t * if (cb) cb(result, handle, user_data); - return; /* LCOV_EXCL_STOP */ + return; } +/* LCOV_EXCL_STOP */ #ifdef TIZEN_GATT_CLIENT int bt_gatt_client_read_value(bt_gatt_h gatt_handle, @@ -3902,7 +3902,7 @@ int bt_gatt_client_write_value(bt_gatt_h gatt_handle, BT_ERR("Invalid handle type for write "); } - return ret; + return ret; /* LCOV_EXCL_STOP */ } #else int bt_gatt_client_write_value(bt_gatt_h gatt_handle, @@ -3960,7 +3960,7 @@ int bt_gatt_client_write_value(bt_gatt_h gatt_handle, ret = BT_ERROR_INVALID_PARAMETER; } - return ret; + return ret; /* LCOV_EXCL_STOP */ } #endif @@ -4027,6 +4027,7 @@ void __uuid_hex_to_string(unsigned char *uuid, char *str) return; } +/* LCOV_EXCL_START */ static bt_gatt_characteristic_s* __gatt_get_characteristic_handle( unsigned char *svc_uuid, int svc_inst, @@ -4079,7 +4080,7 @@ static bt_gatt_characteristic_s* __gatt_get_characteristic_handle( } } return NULL; -} /* LCOV_EXCL_STOP */ +} static bt_gatt_descriptor_s* __gatt_get_descriptor_handle( unsigned char *svc_uuid, @@ -4151,7 +4152,7 @@ static bt_gatt_descriptor_s* __gatt_get_descriptor_handle( } } return NULL; -} /* LCOV_EXCL_STOP */ +} static void __gatt_value_changed_cb(unsigned char *uuid, char *remote_address, char *value, int value_length, void *user_data) @@ -4190,7 +4191,8 @@ static void __gatt_value_changed_cb(unsigned char *uuid, char *remote_address, } } } -} /* LCOV_EXCL_STOP */ +} +/* LCOV_EXCL_STOP */ #else static void __value_changed_cb(char *char_path, char *value, int value_length, void *user_data) @@ -4236,7 +4238,7 @@ static void __value_changed_cb(char *char_path, } } } -} /* LCOV_EXCL_STOP */ +} #endif int bt_gatt_client_set_characteristic_value_changed_cb(bt_gatt_h characteristic, @@ -4492,6 +4494,7 @@ int bt_gatt_client_unset_service_changed_cb(bt_gatt_client_h client) } #ifdef TIZEN_GATT_CLIENT +/* LCOV_EXCL_START */ void _bt_handle_gatt_client_char_read_completed_event(int result, void *resp) { @@ -4897,9 +4900,9 @@ void _bt_handle_gatt_client_desc_write_completed_event(int result, return; } +/* LCOV_EXCL_STOP */ #endif - int bt_gatt_client_request_att_mtu_change(bt_gatt_client_h client, unsigned int mtu) { int ret; diff --git a/src/bluetooth-otp.c b/src/bluetooth-otp.c index 688f94e..b2a96c9 100644 --- a/src/bluetooth-otp.c +++ b/src/bluetooth-otp.c @@ -2599,3 +2599,4 @@ int bt_otp_client_delete_object(bt_otp_client_h otp_client, return error_code; } +/* LCOV_EXCL_STOP */ -- 2.7.4