From a36cb3a760de59fbc8394f449d3370aaa6223011 Mon Sep 17 00:00:00 2001 From: Hyunho Kang Date: Tue, 5 Jul 2016 16:10:54 +0900 Subject: [PATCH] Remove warnings Change-Id: I4db40b9c2e36581386ab2799b3522fc3405a9f31 Signed-off-by: Hyunho Kang --- src/rua_util.c | 3 +-- test/rua-test.c | 12 +++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/rua_util.c b/src/rua_util.c index 9945147..0c0f23e 100644 --- a/src/rua_util.c +++ b/src/rua_util.c @@ -33,8 +33,7 @@ char *_rua_util_get_db_path(uid_t uid, char *db_name) { char db_path[DBPATH_LEN_MAX]; - char *db_path_prefix; - int ret; + const char *db_path_prefix; tzplatform_set_user(uid); db_path_prefix = tzplatform_getenv(TZ_USER_DB); diff --git a/test/rua-test.c b/test/rua-test.c index 6a9c754..2d85442 100644 --- a/test/rua-test.c +++ b/test/rua-test.c @@ -45,7 +45,6 @@ static int __add_history() static int __delete_history_with_pkgname() { int ret; - char *app_path; char *pkgname = "org.tizen.ruatester"; ret = rua_delete_history_with_pkgname_for_uid(pkgname, 5001); @@ -67,7 +66,7 @@ static int __load_rua_history() int row; for (row = 0; row < rows; ++row) { rua_history_get_rec(&record, table, rows, cols, row); - printf("pkgname : %s, time : %d \n", record.pkg_name, record.launch_time); + printf("pkgname : %s, time : %d \n", record.pkg_name, (int)record.launch_time); } rua_history_unload_db(&table); @@ -77,8 +76,6 @@ static int __load_rua_history() static int __update_stat() { int ret; - char *app_path; - char *pkgname = "org.tizen.ruatester"; ret = rua_stat_update_for_uid("ruacaller", "org.tizen.ruatester", 5001); return ret; @@ -152,7 +149,12 @@ int main() printf(" 4. Update RUA stat\n"); printf(" 5. Get RUA stat tags\n"); printf("------------------------------------------\n"); - scanf("%d", &test_num); + ret = scanf("%d", &test_num); + if (ret < 0) { + printf("scanf fail %d", ret); + break; + } + run_next = run_test(test_num); } return ret; -- 2.7.4