Apply line coverage comments 48/109948/1 tizen_3.0_tv accepted/tizen/3.0/common/20170126.092424 accepted/tizen/3.0/ivi/20170126.060429 accepted/tizen/3.0/mobile/20170126.060347 accepted/tizen/3.0/tv/20170126.060400 accepted/tizen/3.0/wearable/20170126.060412 submit/tizen_3.0/20170125.062656
authorpr.jung <pr.jung@samsung.com>
Thu, 12 Jan 2017 08:54:32 +0000 (17:54 +0900)
committerpr.jung <pr.jung@samsung.com>
Thu, 12 Jan 2017 08:54:32 +0000 (17:54 +0900)
Change-Id: I6046285e14c0c9bfd6ab36c463246e40a3613a35
Signed-off-by: pr.jung <pr.jung@samsung.com>
src/battery.c
src/dbus.c
src/haptic.c
src/power.c

index 81bfa70c60d218e2d71cf62c3516f9c2bda8836c..6d314838d4ad6a19f4e24187c7092854b85d172b 100644 (file)
@@ -140,8 +140,10 @@ static int device_battery_get_info(struct battery_info *info)
                        &current_now, &current_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);
index e49e71b7f8a5ecdec6a66572ae1704c5e8e64176..81678075a516ef7c8a36aac1a1d7714a15d902c3 100644 (file)
@@ -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;
        }
 
index 2fcf096bcb41f1dcba7fe615cf276b9d109d1af2..c55dd9102b315d2e3dcb6dc7a22ebdac97f6871d 100644 (file)
@@ -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;
index 7e7cc308a9d1de6132bacd6addd606302f7a9da2..1ee21b77a8bd8fe24b1bdc1955f9ccb8c9add1e8 100644 (file)
@@ -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
 }