Remove warnings 43/78343/1 accepted/tizen/common/20160706.141642 accepted/tizen/ivi/20160705.101529 accepted/tizen/mobile/20160705.101601 accepted/tizen/tv/20160705.101518 accepted/tizen/wearable/20160705.101541 submit/tizen/20160705.062243
authorHyunho Kang <hhstark.kang@samsung.com>
Tue, 5 Jul 2016 07:10:54 +0000 (16:10 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Tue, 5 Jul 2016 07:11:19 +0000 (16:11 +0900)
Change-Id: I4db40b9c2e36581386ab2799b3522fc3405a9f31
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/rua_util.c
test/rua-test.c

index 9945147..0c0f23e 100644 (file)
@@ -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);
index 6a9c754..2d85442 100644 (file)
@@ -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;