freebsd / atf

Libraries to write tests in C, C++ and shell
Other
133 stars 45 forks source link

unused variable errors in lib/atf/libatf-c/macros_test:use #13

Closed asomers closed 10 years ago

asomers commented 10 years ago

Under FreeBSD stable/10 and CURRENT, the lib/atf/libatf-c/macros_test:use test fails because of unused variable errors. The easiest solution is to add references to those variables, as shown in this patch:

--- contrib/atf/atf-c/macros_h_test.c 2013-10-17 15:43:33.000000000 -0600 +++ contrib/atf/atf-c/macros_h_test.c 2014-08-21 15:12:11.000000000 -0600 @@ -101,3 +101,12 @@ ATF_TC_BODY(TEST_MACRO_3, tc) { if (tc != NULL) {} } atf_tc_t _test_name_3 = &ATF_TC_NAME(TEST_MACRO_3); void (_body_3)(const atf_tc_t *) = ATF_TC_BODY_NAME(TEST_MACRO_3); + +ATF_TP_ADD_TCS(tp) +{

jmmv commented 10 years ago

I think this is the same as #8, isn't it? I can't reproduce the problem any longer under amd64 current with clang.