Commit e5b3f9ad authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Compile with clang-6.0

parent 880f9486
...@@ -43,13 +43,13 @@ int main() { ...@@ -43,13 +43,13 @@ int main() {
/* initialize the CUnit test registry */ /* initialize the CUnit test registry */
if (CUE_SUCCESS != CU_initialize_registry()) if (CUE_SUCCESS != CU_initialize_registry())
return CU_get_error(); return (int)CU_get_error();
/* add a suite to the registry */ /* add a suite to the registry */
pSuite = CU_add_suite("libnghttp2_TestSuite", init_suite1, clean_suite1); pSuite = CU_add_suite("libnghttp2_TestSuite", init_suite1, clean_suite1);
if (NULL == pSuite) { if (NULL == pSuite) {
CU_cleanup_registry(); CU_cleanup_registry();
return CU_get_error(); return (int)CU_get_error();
} }
/* add the tests to the suite */ /* add the tests to the suite */
...@@ -62,7 +62,7 @@ int main() { ...@@ -62,7 +62,7 @@ int main() {
!CU_add_test(pSuite, "failmalloc_frame", test_nghttp2_frame) || !CU_add_test(pSuite, "failmalloc_frame", test_nghttp2_frame) ||
!CU_add_test(pSuite, "failmalloc_hd", test_nghttp2_hd)) { !CU_add_test(pSuite, "failmalloc_hd", test_nghttp2_hd)) {
CU_cleanup_registry(); CU_cleanup_registry();
return CU_get_error(); return (int)CU_get_error();
} }
/* Run all tests using the CUnit Basic interface */ /* Run all tests using the CUnit Basic interface */
...@@ -74,6 +74,6 @@ int main() { ...@@ -74,6 +74,6 @@ int main() {
return (int)num_tests_failed; return (int)num_tests_failed;
} else { } else {
printf("CUnit Error: %s\n", CU_get_error_msg()); printf("CUnit Error: %s\n", CU_get_error_msg());
return CU_get_error(); return (int)CU_get_error();
} }
} }
...@@ -55,13 +55,13 @@ int main() { ...@@ -55,13 +55,13 @@ int main() {
/* initialize the CUnit test registry */ /* initialize the CUnit test registry */
if (CUE_SUCCESS != CU_initialize_registry()) if (CUE_SUCCESS != CU_initialize_registry())
return CU_get_error(); return (int)CU_get_error();
/* add a suite to the registry */ /* add a suite to the registry */
pSuite = CU_add_suite("libnghttp2_TestSuite", init_suite1, clean_suite1); pSuite = CU_add_suite("libnghttp2_TestSuite", init_suite1, clean_suite1);
if (NULL == pSuite) { if (NULL == pSuite) {
CU_cleanup_registry(); CU_cleanup_registry();
return CU_get_error(); return (int)CU_get_error();
} }
/* add the tests to the suite */ /* add the tests to the suite */
...@@ -416,7 +416,7 @@ int main() { ...@@ -416,7 +416,7 @@ int main() {
test_nghttp2_bufs_next_present) || test_nghttp2_bufs_next_present) ||
!CU_add_test(pSuite, "bufs_realloc", test_nghttp2_bufs_realloc)) { !CU_add_test(pSuite, "bufs_realloc", test_nghttp2_bufs_realloc)) {
CU_cleanup_registry(); CU_cleanup_registry();
return CU_get_error(); return (int)CU_get_error();
} }
/* Run all tests using the CUnit Basic interface */ /* Run all tests using the CUnit Basic interface */
...@@ -428,6 +428,6 @@ int main() { ...@@ -428,6 +428,6 @@ int main() {
return (int)num_tests_failed; return (int)num_tests_failed;
} else { } else {
printf("CUnit Error: %s\n", CU_get_error_msg()); printf("CUnit Error: %s\n", CU_get_error_msg());
return CU_get_error(); return (int)CU_get_error();
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment