From 1f09e767316f0e0de9cacd6e08055b194c207c57 Mon Sep 17 00:00:00 2001 From: Inkyun Kil Date: Wed, 24 May 2017 17:11:20 +0900 Subject: [PATCH] Fix compile warnings Change-Id: I443e515f060b9408973731b370372f7f3c39d827 Signed-off-by: Inkyun Kil --- test/rua-test.c | 12 +++++++++--- 1 file 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) { -- 2.7.4