From e3d77abfe73e047227f4da5b7ae204f4f017c8e1 Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 23 Jul 2015 10:39:44 +0100 Subject: [PATCH] eina tests, ecore_con tests: fix compiler warnings --- src/tests/ecore_con/ecore_con_test_ecore_con.c | 2 +- src/tests/ecore_con/ecore_con_test_ecore_con_eet.c | 18 +++++++++--------- src/tests/ecore_con/ecore_con_test_ecore_con_url.c | 8 ++++---- src/tests/eina/eina_test_quaternion.c | 1 - 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/tests/ecore_con/ecore_con_test_ecore_con.c b/src/tests/ecore_con/ecore_con_test_ecore_con.c index dc31d8e..67f3672 100644 --- a/src/tests/ecore_con/ecore_con_test_ecore_con.c +++ b/src/tests/ecore_con/ecore_con_test_ecore_con.c @@ -102,7 +102,7 @@ _del(void *data , int type EINA_UNUSED, void *ev) printf("Lost server with ip %s!\n", ecore_con_server_ip_get(event->server)); - fail_unless(ecore_con_server_ip_get(event->server)); + fail_if(!ecore_con_server_ip_get(event->server)); ecore_con_server_del(event->server); } diff --git a/src/tests/ecore_con/ecore_con_test_ecore_con_eet.c b/src/tests/ecore_con/ecore_con_test_ecore_con_eet.c index 5d45c34..932c32a 100644 --- a/src/tests/ecore_con/ecore_con_test_ecore_con_eet.c +++ b/src/tests/ecore_con/ecore_con_test_ecore_con_eet.c @@ -56,7 +56,7 @@ _eet_client_cnct_cb(void *data EINA_UNUSED, Ecore_Con_Reply *reply, Ecore_Con_Cl { const char *ec_eet_data; Ecore_Con_Eet *ec_eet = ecore_con_eet_reply(reply); - fail_unless(ec_eet); + fail_if(!ec_eet); ec_eet_data = ecore_con_eet_data_get(ec_eet); fail_if(strcmp(ec_eet_data, eet_data)); @@ -126,10 +126,10 @@ START_TEST(ecore_con_test_ecore_con_eet_svr_cl) svr = ecore_con_server_add(ECORE_CON_REMOTE_TCP, "127.0.0.1", 8080, NULL); - fail_unless(svr); + fail_if(!svr); ece_svr = ecore_con_eet_server_new(svr); - fail_unless(ece_svr); + fail_if(!ece_svr); ecore_con_eet_data_set(ece_svr, eet_data); @@ -143,10 +143,10 @@ START_TEST(ecore_con_test_ecore_con_eet_svr_cl) cl = ecore_con_server_connect(ECORE_CON_REMOTE_TCP, "127.0.0.1", 8080, NULL); - fail_unless (cl); + fail_if(!cl); ece_cl = ecore_con_eet_client_new(cl); - fail_unless (ece_cl); + fail_if(!ece_cl); ecore_con_eet_register(ece_cl, TEST_STREAM, _ece_test_descriptor); ecore_con_eet_raw_data_callback_add(ece_cl, TEST_STREAM, @@ -210,10 +210,10 @@ START_TEST(ecore_con_test_ecore_con_eet_svr_del) svr = ecore_con_server_add(ECORE_CON_REMOTE_TCP, "127.0.0.1", 8080, NULL); - fail_unless(svr); + fail_if(!svr); ece_svr = ecore_con_eet_server_new(svr); - fail_unless(ece_svr); + fail_if(!ece_svr); ecore_con_eet_data_set(ece_svr, eet_data); @@ -223,10 +223,10 @@ START_TEST(ecore_con_test_ecore_con_eet_svr_del) cl = ecore_con_server_connect(ECORE_CON_REMOTE_TCP, "127.0.0.1", 8080, NULL); - fail_unless (cl); + fail_if(!cl); ece_cl = ecore_con_eet_client_new(cl); - fail_unless (ece_cl); + fail_if(!ece_cl); ecore_con_eet_register(ece_cl, TEST_STREAM, _ece_test_descriptor); ecore_con_eet_server_connect_callback_add(ece_cl, _eet_svr_cnct_cb, diff --git a/src/tests/ecore_con/ecore_con_test_ecore_con_url.c b/src/tests/ecore_con/ecore_con_test_ecore_con_url.c index ec27523..d8b7ab1 100644 --- a/src/tests/ecore_con/ecore_con_test_ecore_con_url.c +++ b/src/tests/ecore_con/ecore_con_test_ecore_con_url.c @@ -180,7 +180,7 @@ START_TEST(ecore_con_test_ecore_con_url_ftp_upload) fprintf(stderr, "directory = %s\n", dir); ec_url = ecore_con_url_new(link); - fail_unless (ec_url); + fail_if(!ec_url); ecore_con_url_verbose_set(ec_url, EINA_TRUE); ecore_con_url_ftp_use_epsv_set(ec_url, EINA_TRUE); @@ -259,7 +259,7 @@ START_TEST(ecore_con_test_ecore_con_url_download) fail_if(ret != 1); url = ecore_con_url_new(link); - fail_unless (url); + fail_if(!url); ecore_con_url_verbose_set(url, EINA_TRUE); @@ -332,7 +332,7 @@ _url_cookies_compl_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event_ headers = ecore_con_url_response_headers_get(url_complete->url_con); - fail_unless(headers); + fail_if(!headers); printf("response headers:\n"); EINA_LIST_FOREACH(headers, l, str) @@ -360,7 +360,7 @@ _ecore_con_url_cookies_test_init() ecore_con_url_init(); ec_url = ecore_con_url_new(link); - fail_unless(ec_url); + fail_if(!ec_url); ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _url_cookies_compl_cb, NULL); diff --git a/src/tests/eina/eina_test_quaternion.c b/src/tests/eina/eina_test_quaternion.c index 9759355..dd704d5 100644 --- a/src/tests/eina/eina_test_quaternion.c +++ b/src/tests/eina/eina_test_quaternion.c @@ -95,7 +95,6 @@ START_TEST(eina_test_quaternion_matrix) 116, -147, 104, 88, 76, -259 }; - Eina_Quaternion tq; Eina_Matrix3 tm; eina_init(); -- 2.7.4