This PR enables the -Wunused-member-function compiler diagnostic, as discussed in #19702.
Notice: The
unused-member-functiondiagnostic is only available on clang. Therefore, clang should be used to test this PR.
- Include the
-Wunused-member-functiondiagnostic in./configure.ac. (ed69213c2b2a99023bdee5168614cb8b71990f5f) - Resolve the reported warnings. (819d03b932134ee91df3b0fe98a481a331ce57bf)
Currently, enabling this flag no longer reports the following warnings:
Note: output from
make 2>&1 | grep "warning: unused member function" | sort | uniq -c
1 index/blockfilterindex.cpp:54:5: warning: unused member function 'DBHeightKey' [-Wunused-member-function]
2 script/bitcoinconsensus.cpp:50:9: warning: unused member function 'GetType' [-Wunused-member-function]
1 test/util_tests.cpp:1975:14: warning: unused member function 'operator=' [-Wunused-member-function]
All tests have passed locally (from make check & src/test/test_bitcoin).
This PR closes #19702.