summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInkyun Kil <inkyun.kil@samsung.com>2017-05-24 17:11:20 +0900
committerInkyun Kil <inkyun.kil@samsung.com>2017-05-24 17:11:20 +0900
commit1f09e767316f0e0de9cacd6e08055b194c207c57 (patch)
treed1718c046915002350e9c06a055f5631a86f80a3
parentee7b904bcffed14a2cba561043c74c339b8c2688 (diff)
downloadlibrua-1f09e767316f0e0de9cacd6e08055b194c207c57.tar.gz
librua-1f09e767316f0e0de9cacd6e08055b194c207c57.tar.bz2
librua-1f09e767316f0e0de9cacd6e08055b194c207c57.zip
Fix compile warnings
Change-Id: I443e515f060b9408973731b370372f7f3c39d827 Signed-off-by: Inkyun Kil <inkyun.kil@samsung.com>
-rw-r--r--test/rua-test.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/rua-test.c b/test/rua-test.c
index 1dd6bf3..5aa3619 100644
--- a/test/rua-test.c
+++ b/test/rua-test.c
@@ -38,7 +38,7 @@ static pthread_t g_thread;
static int callback_id_table[10] = { 0, };
static gboolean run_test(int selected_number);
-static void __print_menu()
+static void *__print_menu(void *arg)
{
int test_num = 0;
int run_next = 1;
@@ -65,9 +65,10 @@ static void __print_menu()
run_next = run_test(test_num);
}
+ return NULL;
}
-static void __update_cb(char **table, int rows, int cols)
+static void __update_cb(char **table, int rows, int cols, void *user_data)
{
struct rua_rec record;
@@ -175,7 +176,12 @@ static int __unregister_callback()
int i = 0;
int id = 0;
printf("Enter callback_id (The number from register_callback) : ");
- scanf("%d", &id);
+ ret = scanf("%d", &id);
+ if (ret < 0) {
+ printf("scanf fail %d", ret);
+ return -1;
+ }
+
for (i = 0; i < 10; i++) {
if (callback_id_table[i] == id) {