summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ut/Makefile.am3
-rw-r--r--ut/stubs/eom_wayland.cpp16
-rw-r--r--ut/stubs/pthread_stubs.h15
-rw-r--r--ut/ut_eom.cpp166
4 files changed, 106 insertions, 94 deletions
diff --git a/ut/Makefile.am b/ut/Makefile.am
index c762359..50be139 100644
--- a/ut/Makefile.am
+++ b/ut/Makefile.am
@@ -15,7 +15,8 @@ eom_utests_CXXFLAGS = \
-I../include \
-I./gtest/googletest/include \
-fpermissive \
- -w
+ -Wall \
+ -Wextra
eom_utests_LDADD = \
gtest/googletest/lib/.libs/libgtest.a
diff --git a/ut/stubs/eom_wayland.cpp b/ut/stubs/eom_wayland.cpp
index 48c0cbf..b300633 100644
--- a/ut/stubs/eom_wayland.cpp
+++ b/ut/stubs/eom_wayland.cpp
@@ -36,7 +36,7 @@ int EOM_WAYLAND_CLIENT_INIT_ERROR;
GValue value[10];
-bool eom_wayland_client_init(notify_func func)
+bool eom_wayland_client_init(notify_func __attribute__ ((unused)) func)
{
if (EOM_WAYLAND_CLIENT_INIT_ERROR) {
return false;
@@ -45,11 +45,11 @@ bool eom_wayland_client_init(notify_func func)
return true;
}
-void eom_wayland_client_deinit(GList *cb_info_list)
+void eom_wayland_client_deinit(GList __attribute__ ((unused)) *cb_info_list)
{
}
-GArray *eom_wayland_client_get_output_ids(void)
+GArray *eom_wayland_client_get_output_ids()
{
if (EOM_WAYLEND_ERROR) {
return NULL;
@@ -71,7 +71,7 @@ GArray *eom_wayland_client_get_output_ids(void)
return ret_array;
}
-GArray *eom_wayland_client_get_output_info(eom_output_id output_id)
+GArray *eom_wayland_client_get_output_info(eom_output_id __attribute__ ((unused)) output_id)
{
memset(value, 0, 10 * sizeof(GValue));
GArray *ret_array = g_array_new(false, false, sizeof(GValue));
@@ -96,8 +96,8 @@ GArray *eom_wayland_client_get_output_info(eom_output_id output_id)
return ret_array;
}
-GArray *eom_wayland_client_set_attribute(eom_output_id output_id,
- eom_output_attribute_e attry)
+GArray *eom_wayland_client_set_attribute(eom_output_id __attribute__ ((unused)) output_id,
+ eom_output_attribute_e __attribute__ ((unused)) attry)
{
if (EOM_WAYLEND_ERROR) {
return NULL;
@@ -116,8 +116,8 @@ GArray *eom_wayland_client_set_attribute(eom_output_id output_id,
return ret_array;
}
-GArray *eom_wayland_client_set_window(eom_output_id output_id,
- Evas_Object *win)
+GArray *eom_wayland_client_set_window(eom_output_id __attribute__ ((unused)) output_id,
+ Evas_Object __attribute__ ((unused)) *win)
{
if (EOM_WAYLEND_ERROR) {
return NULL;
diff --git a/ut/stubs/pthread_stubs.h b/ut/stubs/pthread_stubs.h
index 0fa4e83..f80c4db 100644
--- a/ut/stubs/pthread_stubs.h
+++ b/ut/stubs/pthread_stubs.h
@@ -35,18 +35,21 @@
static int PTHREAD_MUTEX_INIT_ERROR;
-static int ut_pthread_mutex_lock(pthread_mutex_t * __mutex)
+static int
+ut_pthread_mutex_lock(pthread_mutex_t __attribute__ ((unused)) *mutex)
{
-
+ return 0;
}
-static int ut_pthread_mutex_unlock(pthread_mutex_t * __mutex)
+static int
+ut_pthread_mutex_unlock(pthread_mutex_t __attribute__ ((unused)) *mutex)
{
-
+ return 0;
}
-static int ut_pthread_mutex_init(pthread_mutex_t * __mutex,
- const pthread_mutexattr_t * __mutexattr)
+static int
+ut_pthread_mutex_init(pthread_mutex_t __attribute__ ((unused)) *mutex,
+ pthread_mutexattr_t __attribute__ ((unused)) *mutexattr)
{
if (PTHREAD_MUTEX_INIT_ERROR) {
return PTHREAD_MUTEX_INIT_ERROR;
diff --git a/ut/ut_eom.cpp b/ut/ut_eom.cpp
index b2c81f6..c807ce3 100644
--- a/ut/ut_eom.cpp
+++ b/ut/ut_eom.cpp
@@ -45,9 +45,11 @@ extern int EOM_WAYLAND_CLIENT_INIT_ERROR;
/* HELPER FUNCTIONS */
-void ut_eom_cb(eom_output_id output_id, void *user_data) {}
+void ut_eom_cb(eom_output_id __attribute__ ((unused)) output_id,
+ void __attribute__ ((unused)) *user_data) {}
-void ut_eom_cb1(eom_output_id output_id, void *user_data) {}
+void ut_eom_cb1(eom_output_id __attribute__ ((unused)) output_id,
+ void __attribute__ ((unused)) *user_data) {}
static void _init_test()
{
@@ -86,7 +88,7 @@ TEST(eom_set_output_window, work_flow_success_5)
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_set_output_window(output_id, win);
+ error = (eom_error_e)eom_set_output_window(output_id, win);
ASSERT_EQ(error, expected_error);
}
@@ -108,7 +110,7 @@ TEST(eom_set_output_window, work_flow_success_4)
output_info_list = &list;
EOM_WAYLEND_RET_ERROR = 1;
- error = eom_set_output_window(output_id, win);
+ error = (eom_error_e)eom_set_output_window(output_id, win);
ASSERT_EQ(error, expected_error);
}
@@ -130,7 +132,7 @@ TEST(eom_set_output_window, work_flow_success_3)
output_info_list = &list;
EOM_WAYLEND_ERROR = 1;
- error = eom_set_output_window(output_id, win);
+ error = (eom_error_e)eom_set_output_window(output_id, win);
ASSERT_EQ(error, expected_error);
}
@@ -144,7 +146,7 @@ TEST(eom_set_output_window, work_flow_success_2)
_init_test();
- error = eom_set_output_window(output_id, win);
+ error = (eom_error_e)eom_set_output_window(output_id, win);
ASSERT_EQ(error, expected_error);
}
@@ -157,7 +159,7 @@ TEST(eom_set_output_window, work_flow_success_1)
_init_test();
- error = eom_set_output_window(0, win);
+ error = (eom_error_e)eom_set_output_window(0, win);
ASSERT_EQ(error, expected_error);
}
@@ -170,7 +172,7 @@ TEST(eom_set_output_window, null_ptr_fail_1)
_init_test();
- error = eom_set_output_window(output_id, NULL);
+ error = (eom_error_e)eom_set_output_window(output_id, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -199,7 +201,8 @@ TEST(eom_get_output_physical_size, work_flow_success_3)
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_physical_size(output_id, &phy_width, &phy_height);
+ error = (eom_error_e)eom_get_output_physical_size(output_id, &phy_width,
+ &phy_height);
last_result = get_last_result();
@@ -218,7 +221,7 @@ TEST(eom_get_output_physical_size, work_flow_success_2)
_init_test();
- error = eom_get_output_physical_size(output_id, NULL, NULL);
+ error = (eom_error_e)eom_get_output_physical_size(output_id, NULL, NULL);
last_result = get_last_result();
@@ -233,7 +236,7 @@ TEST(eom_get_output_physical_size, work_flow_success_1)
_init_test();
- error = eom_get_output_physical_size(0, NULL, NULL);
+ error = (eom_error_e)eom_get_output_physical_size(0, NULL, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -262,7 +265,7 @@ TEST(eom_get_output_resolution, work_flow_success_3)
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_resolution(output_id, &width, &height);
+ error = (eom_error_e)eom_get_output_resolution(output_id, &width, &height);
last_result = get_last_result();
@@ -281,7 +284,7 @@ TEST(eom_get_output_resolution, work_flow_success_2)
_init_test();
- error = eom_get_output_resolution(output_id, NULL, NULL);
+ error = (eom_error_e)eom_get_output_resolution(output_id, NULL, NULL);
last_result = get_last_result();
@@ -296,7 +299,7 @@ TEST(eom_get_output_resolution, work_flow_success_1)
_init_test();
- error = eom_get_output_resolution(0, NULL, NULL);
+ error = (eom_error_e)eom_get_output_resolution(0, NULL, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -322,7 +325,7 @@ TEST(eom_get_output_attribute_state, work_flow_success_3)
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_attribute_state(output_id, &state);
+ error = (eom_error_e)eom_get_output_attribute_state(output_id, &state);
last_result = get_last_result();
@@ -341,7 +344,7 @@ TEST(eom_get_output_attribute_state, work_flow_success_2)
_init_test();
- error = eom_get_output_attribute_state(output_id, &state);
+ error = (eom_error_e)eom_get_output_attribute_state(output_id, &state);
last_result = get_last_result();
@@ -357,7 +360,7 @@ TEST(eom_get_output_attribute_state, work_flow_success_1)
_init_test();
- error = eom_get_output_attribute_state(0, &state);
+ error = (eom_error_e)eom_get_output_attribute_state(0, &state);
ASSERT_EQ(error, expected_error);
}
@@ -383,7 +386,7 @@ TEST(eom_get_output_attribute, work_flow_success_3)
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_attribute(output_id, &attribute);
+ error = (eom_error_e)eom_get_output_attribute(output_id, &attribute);
last_result = get_last_result();
@@ -402,7 +405,7 @@ TEST(eom_get_output_attribute, work_flow_success_2)
_init_test();
- error = eom_get_output_attribute(output_id, &attribute);
+ error = (eom_error_e)eom_get_output_attribute(output_id, &attribute);
last_result = get_last_result();
@@ -418,7 +421,7 @@ TEST(eom_get_output_attribute, work_flow_success_1)
_init_test();
- error = eom_get_output_attribute(0, &attribute);
+ error = (eom_error_e)eom_get_output_attribute(0, &attribute);
ASSERT_EQ(error, expected_error);
}
@@ -444,7 +447,7 @@ TEST(eom_get_output_mode, work_flow_success_3)
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_mode(output_id, &mode);
+ error = (eom_error_e)eom_get_output_mode(output_id, &mode);
last_result = get_last_result();
@@ -463,7 +466,7 @@ TEST(eom_get_output_mode, work_flow_success_2)
_init_test();
- error = eom_get_output_mode(output_id, &mode);
+ error = (eom_error_e)eom_get_output_mode(output_id, &mode);
last_result = get_last_result();
@@ -479,7 +482,7 @@ TEST(eom_get_output_mode, work_flow_success_1)
_init_test();
- error = eom_get_output_mode(0, &mode);
+ error = (eom_error_e)eom_get_output_mode(0, &mode);
ASSERT_EQ(error, expected_error);
}
@@ -505,7 +508,7 @@ TEST(eom_get_output_type, work_flow_success_3)
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_get_output_type(output_id, &type);
+ error = (eom_error_e)eom_get_output_type(output_id, &type);
last_result = get_last_result();
@@ -524,7 +527,7 @@ TEST(eom_get_output_type1, work_flow_success_2)
_init_test();
- error = eom_get_output_type(output_id, &type);
+ error = (eom_error_e)eom_get_output_type(output_id, &type);
last_result = get_last_result();
@@ -540,7 +543,7 @@ TEST(eom_get_output_type2, work_flow_success_1)
_init_test();
- error = eom_get_output_type(0, &type);
+ error = (eom_error_e)eom_get_output_type(0, &type);
ASSERT_EQ(error, expected_error);
}
@@ -563,7 +566,7 @@ TEST(eom_set_output_attribute, work_flow_success_7)
list.next = list.prev = NULL;
output_info_list = &list;
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
ASSERT_EQ(error, expected_error);
ASSERT_EQ(output_info.attribute, attr);
@@ -586,7 +589,7 @@ TEST(eom_set_output_attribute, work_flow_success_6)
output_info_list = &list;
EOM_WAYLEND_RET_ERROR = 1;
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
ASSERT_EQ(error, expected_error);
}
@@ -608,7 +611,7 @@ TEST(eom_set_output_attribute, work_flow_success_5)
output_info_list = &list;
EOM_WAYLEND_ERROR = 1;
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
ASSERT_EQ(error, expected_error);
}
@@ -623,7 +626,7 @@ TEST(eom_set_output_attribute, work_flow_success_4)
_init_test();
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
last_result = get_last_result();
@@ -640,7 +643,7 @@ TEST(eom_set_output_attribute, work_flow_success_3)
_init_test();
- error = eom_set_output_attribute(output_id, attr);
+ error = (eom_error_e)eom_set_output_attribute(output_id, attr);
ASSERT_EQ(error, expected_error);
}
@@ -653,7 +656,7 @@ TEST(eom_set_output_attribute, work_flow_success_2)
_init_test();
- error = eom_set_output_attribute(1, attr);
+ error = (eom_error_e)eom_set_output_attribute(1, attr);
ASSERT_EQ(error, expected_error);
}
@@ -666,7 +669,7 @@ TEST(eom_set_output_attribute, work_flow_success_1)
_init_test();
- error = eom_set_output_attribute(0, attr);
+ error = (eom_error_e)eom_set_output_attribute(0, attr);
ASSERT_EQ(error, expected_error);
}
@@ -683,13 +686,14 @@ TEST(eom_unset_attribute_changed_cb, work_flow_success_3)
_init_test();
cb_info1.attribute_change_func = ut_eom_cb1;
- cb_info2 = calloc(1, sizeof(eom_output_notify_cb_info));
+ cb_info2 = (eom_output_notify_cb_info *)
+ calloc(1, sizeof(eom_output_notify_cb_info));
cb_info2->attribute_change_func = ut_eom_cb;
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, cb_info2);
FREE_TESTED_PTR = cb_info2;
- error = eom_unset_attribute_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_attribute_changed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, cb_info2);
@@ -712,7 +716,7 @@ TEST(eom_unset_attribute_changed_cb, work_flow_success_2)
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, &cb_info2);
- error = eom_unset_attribute_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_attribute_changed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, &cb_info2);
@@ -727,7 +731,7 @@ TEST(eom_unset_attribute_changed_cb, work_flow_success_1)
_init_test();
- error = eom_unset_attribute_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_attribute_changed_cb(ut_eom_cb);
ASSERT_EQ(error, expected_error);
}
@@ -739,7 +743,7 @@ TEST(eom_unset_attribute_changed_cb, null_ptr_fail_1)
_init_test();
- error = eom_unset_attribute_changed_cb(NULL);
+ error = (eom_error_e)eom_unset_attribute_changed_cb(NULL);
ASSERT_EQ(error, expected_error);
}
@@ -758,7 +762,7 @@ TEST(eom_set_attribute_changed_cb, work_flow_success_4)
_init_test();
- error = eom_set_attribute_changed_cb(ut_eom_cb, &user_data);
+ error = (eom_error_e)eom_set_attribute_changed_cb(ut_eom_cb, &user_data);
ASSERT_EQ(error, expected_error);
ASSERT_TRUE(cb_info_list != NULL);
@@ -785,7 +789,7 @@ TEST(eom_set_attribute_changed_cb, work_flow_success_3)
CALLOC_ERROR = 1;
- error = eom_set_attribute_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_attribute_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -812,7 +816,7 @@ TEST(eom_set_attribute_changed_cb, work_flow_success_2)
list1.next = &list;
list.prev = &list1;
- error = eom_set_attribute_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_attribute_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -831,7 +835,7 @@ TEST(eom_set_attribute_changed_cb, work_flow_success_1)
cb_info_list = &list;
list.next = list.prev = NULL;
- error = eom_set_attribute_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_attribute_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -843,7 +847,7 @@ TEST(eom_set_attribute_changed_cb, null_ptr_fail_1)
_init_test();
- error = eom_set_attribute_changed_cb(NULL, NULL);
+ error = (eom_error_e)eom_set_attribute_changed_cb(NULL, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -860,13 +864,14 @@ TEST(eom_unset_mode_changed_cb, work_flow_success_3)
_init_test();
cb_info1.mode_change_func = ut_eom_cb1;
- cb_info2 = calloc(1, sizeof(eom_output_notify_cb_info));
+ cb_info2 = (eom_output_notify_cb_info *)
+ calloc(1, sizeof(eom_output_notify_cb_info));
cb_info2->mode_change_func = ut_eom_cb;
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, cb_info2);
FREE_TESTED_PTR = cb_info2;
- error = eom_unset_mode_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_mode_changed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, cb_info2);
@@ -889,7 +894,7 @@ TEST(eom_unset_mode_changed_cb, work_flow_success_2)
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, &cb_info2);
- error = eom_unset_mode_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_mode_changed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, &cb_info2);
@@ -904,7 +909,7 @@ TEST(eom_unset_mode_changed_cb, work_flow_success_1)
_init_test();
- error = eom_unset_mode_changed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_mode_changed_cb(ut_eom_cb);
ASSERT_EQ(error, expected_error);
}
@@ -916,7 +921,7 @@ TEST(eom_unset_mode_changed_cb, null_ptr_fail_1)
_init_test();
- error = eom_unset_mode_changed_cb(NULL);
+ error = (eom_error_e)eom_unset_mode_changed_cb(NULL);
ASSERT_EQ(error, expected_error);
}
@@ -935,7 +940,7 @@ TEST(eom_set_mode_changed_cb, work_flow_success_4)
_init_test();
- error = eom_set_mode_changed_cb(ut_eom_cb, &user_data);
+ error = (eom_error_e)eom_set_mode_changed_cb(ut_eom_cb, &user_data);
ASSERT_EQ(error, expected_error);
ASSERT_TRUE(cb_info_list != NULL);
@@ -963,7 +968,7 @@ TEST(eom_set_mode_changed_cb, work_flow_success_3)
cb_info_list = NULL;
CALLOC_ERROR = 1;
- error = eom_set_mode_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_mode_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -990,7 +995,7 @@ TEST(eom_set_mode_changed_cb, work_flow_success_2)
list1.next = &list;
list.prev = &list1;
- error = eom_set_mode_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_mode_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1009,7 +1014,7 @@ TEST(eom_set_mode_changed_cb, work_flow_success_1)
cb_info_list = &list;
list.next = list.prev = NULL;
- error = eom_set_mode_changed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_mode_changed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1021,7 +1026,7 @@ TEST(eom_set_mode_changed_cb, null_ptr_fail_1)
_init_test();
- error = eom_set_mode_changed_cb(NULL, NULL);
+ error = (eom_error_e)eom_set_mode_changed_cb(NULL, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1038,13 +1043,14 @@ TEST(eom_unset_output_removed_cb, work_flow_success_3)
_init_test();
cb_info1.remove_func = ut_eom_cb1;
- cb_info2 = calloc(1, sizeof(eom_output_notify_cb_info));
+ cb_info2 = (eom_output_notify_cb_info *)
+ calloc(1, sizeof(eom_output_notify_cb_info));
cb_info2->remove_func = ut_eom_cb;
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, cb_info2);
FREE_TESTED_PTR = cb_info2;
- error = eom_unset_output_removed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_removed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, cb_info2);
@@ -1067,7 +1073,7 @@ TEST(eom_unset_output_removed_cb, work_flow_success_2)
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, &cb_info2);
- error = eom_unset_output_removed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_removed_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, &cb_info2);
@@ -1082,7 +1088,7 @@ TEST(eom_unset_output_removed_cb, work_flow_success_1)
_init_test();
- error = eom_unset_output_removed_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_removed_cb(ut_eom_cb);
ASSERT_EQ(error, expected_error);
}
@@ -1094,7 +1100,7 @@ TEST(eom_unset_output_removed_cb, null_ptr_fail_1)
_init_test();
- error = eom_unset_output_removed_cb(NULL);
+ error = (eom_error_e)eom_unset_output_removed_cb(NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1113,7 +1119,7 @@ TEST(eom_set_output_removed_cb, work_flow_success_4)
_init_test();
- error = eom_set_output_removed_cb(ut_eom_cb, &user_data);
+ error = (eom_error_e)eom_set_output_removed_cb(ut_eom_cb, &user_data);
ASSERT_EQ(error, expected_error);
ASSERT_TRUE(cb_info_list != NULL);
@@ -1140,7 +1146,7 @@ TEST(eom_set_output_removed_cb, work_flow_success_3)
CALLOC_ERROR = 1;
- error = eom_set_output_removed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_removed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1167,7 +1173,7 @@ TEST(eom_set_output_removed_cb, work_flow_success_2)
list1.next = &list;
list.prev = &list1;
- error = eom_set_output_removed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_removed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1186,7 +1192,7 @@ TEST(eom_set_output_removed_cb, work_flow_success_1)
cb_info_list = &list;
list.next = list.prev = NULL;
- error = eom_set_output_removed_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_removed_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1198,7 +1204,7 @@ TEST(eom_set_output_removed_cb, null_ptr_fail_1)
_init_test();
- error = eom_set_output_removed_cb(NULL, NULL);
+ error = (eom_error_e)eom_set_output_removed_cb(NULL, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1215,13 +1221,14 @@ TEST(eom_unset_output_added_cb, work_flow_success_3)
_init_test();
cb_info1.add_func = ut_eom_cb1;
- cb_info2 = calloc(1, sizeof(eom_output_notify_cb_info));
+ cb_info2 = (eom_output_notify_cb_info *)
+ calloc(1, sizeof(eom_output_notify_cb_info));
cb_info2->add_func = ut_eom_cb;
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, cb_info2);
FREE_TESTED_PTR = cb_info2;
- error = eom_unset_output_added_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_added_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, cb_info2);
@@ -1244,7 +1251,7 @@ TEST(eom_unset_output_added_cb, work_flow_success_2)
cb_info_list = g_list_append(cb_info_list, &cb_info1);
cb_info_list = g_list_append(cb_info_list, &cb_info2);
- error = eom_unset_output_added_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_added_cb(ut_eom_cb);
cb_info_list = g_list_remove(cb_info_list, &cb_info1);
cb_info_list = g_list_remove(cb_info_list, &cb_info2);
@@ -1259,7 +1266,7 @@ TEST(eom_unset_output_added_cb, work_flow_success_1)
_init_test();
- error = eom_unset_output_added_cb(ut_eom_cb);
+ error = (eom_error_e)eom_unset_output_added_cb(ut_eom_cb);
ASSERT_EQ(error, expected_error);
}
@@ -1271,7 +1278,7 @@ TEST(eom_unset_output_added_cb, null_ptr_fail_1)
_init_test();
- error = eom_unset_output_added_cb(NULL);
+ error = (eom_error_e)eom_unset_output_added_cb(NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1290,7 +1297,7 @@ TEST(eom_set_output_added_cb, work_flow_success_4)
_init_test();
- error = eom_set_output_added_cb(ut_eom_cb, &user_data);
+ error = (eom_error_e)eom_set_output_added_cb(ut_eom_cb, &user_data);
ASSERT_EQ(error, expected_error);
ASSERT_TRUE(cb_info_list != NULL);
@@ -1317,7 +1324,7 @@ TEST(eom_set_output_added_cb, work_flow_success_3)
CALLOC_ERROR = 1;
- error = eom_set_output_added_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_added_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1344,7 +1351,7 @@ TEST(eom_set_output_added_cb, work_flow_success_2)
list1.next = &list;
list.prev = &list1;
- error = eom_set_output_added_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_added_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1363,7 +1370,7 @@ TEST(eom_set_output_added_cb, work_flow_success_1)
cb_info_list = &list;
list.next = list.prev = NULL;
- error = eom_set_output_added_cb(ut_eom_cb, NULL);
+ error = (eom_error_e)eom_set_output_added_cb(ut_eom_cb, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1375,7 +1382,7 @@ TEST(eom_set_output_added_cb, null_ptr_fail_1)
_init_test();
- error = eom_set_output_added_cb(NULL, NULL);
+ error = (eom_error_e)eom_set_output_added_cb(NULL, NULL);
ASSERT_EQ(error, expected_error);
}
@@ -1494,14 +1501,15 @@ TEST(eom_deinit, work_flow_success_2)
_init_test();
- list.next = list.prev = list.data = NULL;
+ list.next = list.prev = NULL;
+ list.data = NULL;
output_info_list = &list;
- eom_output_info *data1 = calloc(1, sizeof(eom_output_info));
+ eom_output_info *data1 = (eom_output_info *)calloc(1, sizeof(eom_output_info));
data1->width = 1;
- eom_output_info *data2 = calloc(1, sizeof(eom_output_info));
+ eom_output_info *data2 = (eom_output_info *)calloc(1, sizeof(eom_output_info));
data2->width = 2;
- eom_output_info *data3 = calloc(1, sizeof(eom_output_info));
+ eom_output_info *data3 = (eom_output_info *)calloc(1, sizeof(eom_output_info));
data3->width = 3;
output_info_list = g_list_append(output_info_list, data1);
output_info_list = g_list_append(output_info_list, data2);
@@ -1542,7 +1550,7 @@ TEST(eom_init, work_flow_success_2)
_init_test();
- error = eom_init();
+ error = (eom_error_e)eom_init();
ASSERT_EQ(error, expected_error);
}
@@ -1556,7 +1564,7 @@ TEST(eom_init, work_flow_success_1)
EOM_WAYLAND_CLIENT_INIT_ERROR = 1;
- error = eom_init();
+ error = (eom_error_e)eom_init();
ASSERT_EQ(error, expected_error);
}