diff --git a/tests/failmalloc.c b/tests/failmalloc.c index 6ca39165..4bf83ca5 100644 --- a/tests/failmalloc.c +++ b/tests/failmalloc.c @@ -43,13 +43,13 @@ int main() { /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) - return CU_get_error(); + return (int)CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("libnghttp2_TestSuite", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); - return CU_get_error(); + return (int)CU_get_error(); } /* add the tests to the suite */ @@ -62,7 +62,7 @@ int main() { !CU_add_test(pSuite, "failmalloc_frame", test_nghttp2_frame) || !CU_add_test(pSuite, "failmalloc_hd", test_nghttp2_hd)) { CU_cleanup_registry(); - return CU_get_error(); + return (int)CU_get_error(); } /* Run all tests using the CUnit Basic interface */ @@ -74,6 +74,6 @@ int main() { return (int)num_tests_failed; } else { printf("CUnit Error: %s\n", CU_get_error_msg()); - return CU_get_error(); + return (int)CU_get_error(); } } diff --git a/tests/main.c b/tests/main.c index 41e52017..aa584ad8 100644 --- a/tests/main.c +++ b/tests/main.c @@ -55,13 +55,13 @@ int main() { /* initialize the CUnit test registry */ if (CUE_SUCCESS != CU_initialize_registry()) - return CU_get_error(); + return (int)CU_get_error(); /* add a suite to the registry */ pSuite = CU_add_suite("libnghttp2_TestSuite", init_suite1, clean_suite1); if (NULL == pSuite) { CU_cleanup_registry(); - return CU_get_error(); + return (int)CU_get_error(); } /* add the tests to the suite */ @@ -416,7 +416,7 @@ int main() { test_nghttp2_bufs_next_present) || !CU_add_test(pSuite, "bufs_realloc", test_nghttp2_bufs_realloc)) { CU_cleanup_registry(); - return CU_get_error(); + return (int)CU_get_error(); } /* Run all tests using the CUnit Basic interface */ @@ -428,6 +428,6 @@ int main() { return (int)num_tests_failed; } else { printf("CUnit Error: %s\n", CU_get_error_msg()); - return CU_get_error(); + return (int)CU_get_error(); } }