libgraphqlparser
libgraphqlparser copied to clipboard
Fix the `-Wunused-parameter` build-time warning.
The methods of the AstVisitor base class defines interface only and
have no implementation. These should be marked as [[maybe_unused]] to
prevent propagate the build warnings.
Signed-off-by: Igor Kononenko [email protected]
The committers are authorized under a signed CLA.
- :white_check_mark: Igor Kononenko (c39e449e179e8fd5ba6951532b37814f726afdea)
[[maybe_unused]] was "only" added in C++17.
https://en.cppreference.com/w/cpp/language/attributes/maybe_unused
While many of us are past that at this point, not all users are. Many of us don't see the warnings, possibly because of this line of code: https://github.com/graphql/libgraphqlparser/blob/master/CMakeLists.txt#L8
Is it possible that the warning only comes when not compiling with the repo's cmake files?