From: pr.jung Date: Thu, 12 Jan 2017 08:54:32 +0000 (+0900) Subject: Apply line coverage comments X-Git-Tag: submit/tizen_3.0/20170125.062656^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3937de0fdc7884da3b0a1a14854da507923b3d24;p=platform%2Fcore%2Fapi%2Fdevice.git Apply line coverage comments Change-Id: I6046285e14c0c9bfd6ab36c463246e40a3613a35 Signed-off-by: pr.jung --- diff --git a/src/battery.c b/src/battery.c index 81bfa70..6d31483 100644 --- a/src/battery.c +++ b/src/battery.c @@ -140,8 +140,10 @@ static int device_battery_get_info(struct battery_info *info) ¤t_now, ¤t_average); if (ret < 0) { + //LCOV_EXCL_START System Error ret = errno_to_device_error(ret); goto out; + //LCOV_EXCL_STOP } snprintf(info->status, sizeof(info->status), "%s", status); diff --git a/src/dbus.c b/src/dbus.c index e49e71b..8167807 100644 --- a/src/dbus.c +++ b/src/dbus.c @@ -144,6 +144,7 @@ static struct proxy_node *find_matched_proxy_node(const char *dest, return NULL; } +//LCOV_EXCL_START Not called Callback static void on_name_vanished(GDBusConnection *connection, const gchar *name, gpointer user_data) @@ -167,6 +168,7 @@ static void on_name_vanished(GDBusConnection *connection, } pthread_mutex_unlock(&dmutex); } +//LCOV_EXCL_STOP static GDBusProxy *get_proxy_from_proxy_pool(const char *dest, const char *path, @@ -426,6 +428,7 @@ int dbus_method_async_with_reply(const char *dest, const char *path, return 0; } +//LCOV_EXCL_START Not called Callback static void haptic_signal_callback(GDBusConnection *conn, const gchar *sender, const gchar *path, @@ -450,6 +453,7 @@ static void haptic_signal_callback(GDBusConnection *conn, restart_callback(); } +//LCOV_EXCL_STOP int register_signal_handler(void) { @@ -482,7 +486,7 @@ int register_signal_handler(void) g_object_unref(conn); if (haptic_id == 0) { - _E("Failed to subscrive bus signal"); + _E("Failed to subscrive bus signal"); //LCOV_EXCL_LINE return -EPERM; } diff --git a/src/haptic.c b/src/haptic.c index 2fcf096..c55dd91 100644 --- a/src/haptic.c +++ b/src/haptic.c @@ -74,6 +74,7 @@ int device_haptic_get_count(int *device_number) return DEVICE_ERROR_NONE; } +//LCOV_EXCL_START Not called Callback void restart_callback(void) { dd_list *elem; @@ -96,6 +97,7 @@ void restart_callback(void) } } +//LCOV_EXCL_STOP int device_haptic_open(int device_index, haptic_device_h *device_handle) { @@ -145,7 +147,7 @@ int device_haptic_open(int device_index, haptic_device_h *device_handle) if (DD_LIST_LENGTH(handle_list) == 1) { ret = register_signal_handler(); if (ret < 0) - _E("Faild to register signal handler"); + _E("Faild to register signal handler"); //LCOV_EXCL_LINE } return DEVICE_ERROR_NONE; @@ -188,7 +190,7 @@ int device_haptic_close(haptic_device_h device_handle) if (DD_LIST_LENGTH(handle_list) == 0) { ret = unregister_signal_handler(); if (ret < 0) - _E("Failed to unregister signal handler"); + _E("Failed to unregister signal handler"); //LCOV_EXCL_LINE } return DEVICE_ERROR_NONE; diff --git a/src/power.c b/src/power.c index 7e7cc30..1ee21b7 100644 --- a/src/power.c +++ b/src/power.c @@ -120,12 +120,13 @@ static void remove_off_lock_timeout(void) static void remove_padding_timeout(void) { if (padding_timeout) { - _I("Padding timeout handler removed"); + _I("Padding timeout handler removed"); //LCOV_EXCL_LINE g_source_remove(padding_timeout); padding_timeout = 0; } } +//LCOV_EXCL_START Not called Callback static void notice_lock_expired_done(void *data, GVariant *result, GError *err) { int val, ret; @@ -291,6 +292,7 @@ static gboolean off_lock_timeout_expired(gpointer data) out: return G_SOURCE_CONTINUE; } +//LCOV_EXCL_STOP static void add_off_lock_timeout(void) { @@ -306,7 +308,7 @@ static void add_off_lock_timeout(void) if (id) off_lock_timeout = id; else - _E("Failed to add Power Lock timeout handler"); + _E("Failed to add Power Lock timeout handler"); //LCOV_EXCL_LINE } #else #define add_off_lock_timeout() do {} while (0) @@ -447,10 +449,10 @@ int device_power_release_lock(power_lock_e type) remove_padding_timeout(); } } else if (type == POWER_LOCK_DISPLAY) { - _W("DEPRECATION WARNING: This power lock enum is deprecated and will be removed from next release. Use efl_util_set_window_screen_mode() instead."); + _W("DEPRECATION WARNING: This power lock enum is deprecated and will be removed from next release. Use efl_util_set_window_screen_mode() instead."); //LCOV_EXCL_LINE ret = unlock_state(DISPLAY_STATE_NORMAL, PM_KEEP_TIMER); } else if (type == POWER_LOCK_DISPLAY_DIM) { - _W("DEPRECATION WARNING: This power lock enum is deprecated and will be removed from next release. Use efl_util_set_window_screen_mode() instead."); + _W("DEPRECATION WARNING: This power lock enum is deprecated and will be removed from next release. Use efl_util_set_window_screen_mode() instead."); //LCOV_EXCL_LINE ret = unlock_state(DISPLAY_STATE_SCREEN_DIM, PM_KEEP_TIMER); } else return DEVICE_ERROR_INVALID_PARAMETER; @@ -524,5 +526,5 @@ static void __CONSTRUCTOR__ power_init(void) ret = config_parse(POWER_CONF, power_load_config, NULL); if (ret < 0) - _E("Failed to load config file (%d)", ret); + _E("Failed to load config file (%d)", ret); //LCOV_EXCL_LINE }