Skip to content

Conversation

medithe
Copy link
Contributor

@medithe medithe commented Aug 21, 2018

In the test-file lest_cpp03.hpp, the parameter lest_env may be not used in the expansion of the macro lest_CASE.
This happens, when compiling with -Wunused-parameter.

The full warning:

In file included from build/optional-lite-src/test/optional-main.t.h:18,
                 from build/optional-lite-src/test/optional-main.t.cpp:8:
build/optional-lite-src/test/optional-main.t.cpp: In function ‘void __lest_function__26(lest::env&)’:
build/optional-lite-src/test/lest_cpp03.hpp:266:43: error: unused parameter ‘lest_env’ [-Werror=unused-parameter]
     static void lest_FUNCTION(lest::env & lest_env)
                               ~~~~~~~~~~~~^~~~~~~~
build/optional-lite-src/test/optional-main.t.h:22:22: note: in expansion of macro ‘lest_CASE’
 #define CASE( name ) lest_CASE( specification(), name )
                      ^~~~~~~~~
build/optional-lite-src/test/optional-main.t.cpp:26:1: note: in expansion of macro ‘CASE’
 CASE( "__cplusplus" "[.stdc++]" )

In the test-file `lest_cpp03.hpp`, the parameter `lest_env` may be not used in the expansion of the macro `lest_CASE`.

The full warning:
In file included from build/optional-lite-src/test/optional-main.t.h:18,
                 from build/optional-lite-src/test/optional-main.t.cpp:8:
build/optional-lite-src/test/optional-main.t.cpp: In function ‘void __lest_function__26(lest::env&)’:
build/optional-lite-src/test/lest_cpp03.hpp:266:43: error: unused parameter ‘lest_env’ [-Werror=unused-parameter]
     static void lest_FUNCTION(lest::env & lest_env)
                               ~~~~~~~~~~~~^~~~~~~~
build/optional-lite-src/test/optional-main.t.h:22:22: note: in expansion of macro ‘lest_CASE’
 #define CASE( name ) lest_CASE( specification(), name )
                      ^~~~~~~~~
build/optional-lite-src/test/optional-main.t.cpp:26:1: note: in expansion of macro ‘CASE’
 CASE( "__cplusplus" "[.stdc++]" )
@martinmoene
Copy link
Owner

martinmoene commented Aug 21, 2018

Thanks @medithe, looks reasonable to me.

Note that env most often is used (review note).

However, please address this to the lest project itself. Afterwards, I'll update the file here

Wonder if the same holds for the C++11 lest.hpp.

martinmoene added a commit that referenced this pull request Aug 28, 2018
@medithe
Copy link
Contributor Author

medithe commented Aug 28, 2018

Is fixed in d2180bb

@medithe medithe closed this Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants