summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2016-07-12 16:38:40 +0900
committerHyunho Kang <hhstark.kang@samsung.com>2016-07-12 01:00:16 -0700
commit5044b87c995eea0174be2257ef9b47f08fe7af5e (patch)
treea5045a870c162233ce710db01183cd00feb4ef0a
parentf41dd8b32395eea33efd951471a1ae332aba56d5 (diff)
downloadwidget-service-5044b87c995eea0174be2257ef9b47f08fe7af5e.tar.gz
widget-service-5044b87c995eea0174be2257ef9b47f08fe7af5e.tar.bz2
widget-service-5044b87c995eea0174be2257ef9b47f08fe7af5e.zip
Change-Id: Idac4cf86460c00f82f7057c98c35586fa67f1bd0 Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rw-r--r--src/widget_conf.c2
-rw-r--r--src/widget_instance.c2
-rw-r--r--src/widget_service.c22
3 files changed, 26 insertions, 0 deletions
diff --git a/src/widget_conf.c b/src/widget_conf.c
index 9ce3364..d9ec629 100644
--- a/src/widget_conf.c
+++ b/src/widget_conf.c
@@ -272,6 +272,7 @@ static struct info {
.search_input_node = 0,
};
+/* LCOV_EXCL_START */
static void visibility_change_delay_handler(char *buffer)
{
if (sscanf(buffer, "%lf", &s_conf.visibility_change_delay) != 1) {
@@ -2131,5 +2132,6 @@ EAPI const int const widget_conf_enable_resource_lock(void)
{
return s_conf.flags.field.enable_resource_lock;
}
+/* LCOV_EXCL_STOP */
/* End of a file */
diff --git a/src/widget_instance.c b/src/widget_instance.c
index fd0cbfe..0b6e91b 100644
--- a/src/widget_instance.c
+++ b/src/widget_instance.c
@@ -716,6 +716,7 @@ static int __widget_handler(const char *viewer_id, aul_app_com_result_e e, bundl
return 0;
}
+/* LCOV_EXCL_START */
static int __fault_handler(int pid, void *data)
{
GList *iter;
@@ -735,6 +736,7 @@ static int __fault_handler(int pid, void *data)
return 0;
}
+/* LCOV_EXCL_STOP */
EAPI int widget_instance_init(const char *viewer_id)
{
diff --git a/src/widget_service.c b/src/widget_service.c
index 85b4bbf..0b720b2 100644
--- a/src/widget_service.c
+++ b/src/widget_service.c
@@ -154,8 +154,10 @@ static sqlite3 *_open_db(uid_t uid)
ret = sqlite3_open_v2(path, &db, SQLITE_OPEN_READONLY, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("failed to open widget db: %d", ret);
return NULL;
+ /* LCOV_EXCL_STOP */
}
return db;
@@ -296,9 +298,11 @@ static int _get_widget_supported_sizes(const char *widget_id, uid_t uid,
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("prepare error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
return WIDGET_ERROR_FAULT;
+ /* LCOV_EXCL_STOP */
}
sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -435,9 +439,11 @@ static int _get_widget_list(const char *pkgid, uid_t uid, GList **list)
ret = sqlite3_prepare_v2(db, query_buf, strlen(query_buf), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("prepare error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
return WIDGET_ERROR_FAULT;
+ /* LCOV_EXCL_STOP */
}
if (pkgid != NULL)
@@ -446,8 +452,10 @@ static int _get_widget_list(const char *pkgid, uid_t uid, GList **list)
while (sqlite3_step(stmt) == SQLITE_ROW) {
item = calloc(1, sizeof(struct widget_list_item));
if (item == NULL) {
+ /* LCOV_EXCL_START */
_E("out of memory");
return WIDGET_ERROR_OUT_OF_MEMORY;
+ /* LCOV_EXCL_STOP */
}
_get_column_str(stmt, 0, &item->classid);
@@ -559,10 +567,12 @@ static char *_get_main_app_id(const char *widget_id, uid_t uid)
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("prepare error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
set_last_result(WIDGET_ERROR_FAULT);
return NULL;
+ /* LCOV_EXCL_STOP */
}
sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -714,10 +724,12 @@ static char *_get_app_id_of_setup_app(const char *widget_id, uid_t uid)
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("prepare error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
set_last_result(WIDGET_ERROR_FAULT);
return NULL;
+ /* LCOV_EXCL_STOP */
}
sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -928,10 +940,12 @@ static char *_get_preview_image_path(const char *widget_id, int width,
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("prepare error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
set_last_result(WIDGET_ERROR_FAULT);
return NULL;
+ /* LCOV_EXCL_STOP */
}
sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -1022,10 +1036,12 @@ static char *_get_icon(const char *widget_id, const char *lang, uid_t uid)
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("prepare error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
set_last_result(WIDGET_ERROR_FAULT);
return NULL;
+ /* LCOV_EXCL_STOP */
}
sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -1105,10 +1121,12 @@ static char *_get_name(const char *widget_id, const char *lang, uid_t uid)
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("step error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
set_last_result(WIDGET_ERROR_FAULT);
return NULL;
+ /* LCOV_EXCL_STOP */
}
sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);
@@ -1217,10 +1235,12 @@ static char *_get_widget_id(const char *appid, uid_t uid)
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("prepare error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
set_last_result(WIDGET_ERROR_FAULT);
return NULL;
+ /* LCOV_EXCL_STOP */
}
sqlite3_bind_text(stmt, 1, appid, -1, SQLITE_STATIC);
@@ -1291,10 +1311,12 @@ static char *_get_package_id(const char *widget_id, uid_t uid)
ret = sqlite3_prepare_v2(db, query, strlen(query), &stmt, NULL);
if (ret != SQLITE_OK) {
+ /* LCOV_EXCL_START */
_E("prepare error: %s", sqlite3_errmsg(db));
sqlite3_close_v2(db);
set_last_result(WIDGET_ERROR_FAULT);
return NULL;
+ /* LCOV_EXCL_STOP */
}
sqlite3_bind_text(stmt, 1, widget_id, -1, SQLITE_STATIC);