Closed wcz233 closed 7 months ago
Collections-C/test/list_test.c:895:5: error: implicit declaration of function ‘CHECK_EQUAL_C_BOOL’; did you mean ‘CHECK_EQUAL_C_REAL’? [-Werror=implicit-function-declaration] 895 | CHECK_EQUAL_C_BOOL(true, *res); | ^~~~~~ | CHECK_EQUAL_C_REAL cc1: all warnings being treated as errors make[2]: [test/CMakeFiles/list_test.dir/build.make:63: test/CMakeFiles/list_test.dir/list_test.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:275: test/CMakeFiles/list_test.dir/all] Error 2 make: *** [Makefile:141: all] Error 2
below is my shell command:
git clone https://github.com/srdja/Collections-C.git cd Collections-C mkdir build cd build cmake .. make
Then I changed "Collections-C/test/list_test.c:895" "CHECK_EQUAL_C_BOOL(true, res);" to "if(res);" :
cd Collections-C sed -i "895s/CHECK_EQUAL_C_BOOL(true, \*res);/if(*res);/g" test/list_test.c cd build make
Test passed.
Fixed.
Collections-C/test/list_test.c:895:5: error: implicit declaration of function ‘CHECK_EQUAL_C_BOOL’; did you mean ‘CHECK_EQUAL_C_REAL’? [-Werror=implicit-function-declaration] 895 | CHECK_EQUAL_C_BOOL(true, *res); | ^
~~~~~ | CHECK_EQUAL_C_REAL cc1: all warnings being treated as errors make[2]: [test/CMakeFiles/list_test.dir/build.make:63: test/CMakeFiles/list_test.dir/list_test.c.o] Error 1 make[1]: [CMakeFiles/Makefile2:275: test/CMakeFiles/list_test.dir/all] Error 2 make: *** [Makefile:141: all] Error 2below is my shell command:
Then I changed "Collections-C/test/list_test.c:895" "CHECK_EQUAL_C_BOOL(true, res);" to "if(res);" :
Test passed.