With C++17 [[maybe_unused]]
attribute it is easy to keep emerged cases in the new code under control.
This PR does not touch -Wno-unused-parameter
as it requires too much of code churning.
Compiler specific notes:
- clang:
-Wunused-macros
not added because it requires a non-trivial checking in theconfigure
script, and it blames only https://github.com/bitcoin/bitcoin/blob/a9d1b40d53ec417eefbe767aa66701ef8e1801d5/src/util/system.cpp#L34-Wunused-template
not added because some of our templates are buried into macros-Wused-but-marked-unused
produces tones of warnings in boost tests
- gcc
-Werror=unused-const-variable
with level 2 seems not suitable for C++ code