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.

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 martinmoene self-requested a review August 22, 2018 07:23
#elif defined __GNUC__
#define lest_MAYBE_UNUSED(ARG) ARG __attribute((unused))
#else
#define lest_MAYBE_UNUSED(ARG)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add missing ARG:

#define lest_MAYBE_UNUSED(ARG)  ARG

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