diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -228,10 +228,14 @@ -Wunreachable-code-loop-increment -Wsign-compare -Wconditional-uninitialized + -Wduplicated-branches + -Wduplicated-cond + -Wlogical-op ) add_compiler_flag_group(-Wformat -Wformat-security) add_cxx_compiler_flags( -Wredundant-move + -Woverloaded-virtual ) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") diff --git a/src/secp256k1/CMakeLists.txt b/src/secp256k1/CMakeLists.txt --- a/src/secp256k1/CMakeLists.txt +++ b/src/secp256k1/CMakeLists.txt @@ -52,6 +52,7 @@ -Wnested-externs -Wstrict-prototypes -Wno-long-long + -Wno-duplicated-branches ) # Default visibility is hidden on all targets. diff --git a/src/test/rpc_server_tests.cpp b/src/test/rpc_server_tests.cpp --- a/src/test/rpc_server_tests.cpp +++ b/src/test/rpc_server_tests.cpp @@ -24,6 +24,9 @@ explicit ArgsTestRPCCommand(const std::string &nameIn) : RPCCommandWithArgsContext(nameIn) {} + // Suppress a [-Werror=overloaded-virtual] warning + using RPCCommandWithArgsContext::Execute; + UniValue Execute(const UniValue &args) const override { BOOST_CHECK_EQUAL(args["arg1"].get_str(), "value1"); return UniValue("testing1");