Skip to content

Commit 3bd25c0

Browse files
author
MarcoFalke
committed
Merge #13899: build: Enable -Wredundant-decls where available. Remove redundant redeclarations.
d56b73f Remove redundant extern (practicalswift) f04bb13 Enable -Wredundant-decls (gcc) if available (practicalswift) a9e90e5 Remove redundant redeclaration of rescanblockchain(...) in same scope (practicalswift) Pull request description: Remove redundant redeclaration of `rescanblockchain` and enable `-Wredundant-decls` (gcc) where available to avoid accidental redundant redeclarations. ``` CXX wallet/libbitcoin_wallet_a-rpcwallet.o wallet/rpcwallet.cpp:4764:17: warning: redundant redeclaration of ‘UniValue rescanblockchain(const JSONRPCRequest&)’ in same scope [-Wredundant-decls] extern UniValue rescanblockchain(const JSONRPCRequest& request); ^~~~~~~~~~~~~~~~ wallet/rpcwallet.cpp:3929:10: note: previous declaration of ‘UniValue rescanblockchain(const JSONRPCRequest&)’ UniValue rescanblockchain(const JSONRPCRequest& request) ^~~~~~~~~~~~~~~~ ``` Tree-SHA512: b9af95fa53f494c3f6702e485956b66b042d2ff7578b4a53bf28e91aa844cdcf5d7ac3e2e710948eed566007324e81317304b8eabf2d4ea284cd6acd77f8ffcd
2 parents 6edda06 + d56b73f commit 3bd25c0

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
303303
AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
304304
AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]])
305305
AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]])
306+
AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]])
306307

307308
## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
308309
## unknown options if any other warning is produced. Test the -Wfoo case, and

src/wallet/rpcwallet.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4751,17 +4751,16 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
47514751
return result;
47524752
}
47534753

4754-
extern UniValue abortrescan(const JSONRPCRequest& request); // in rpcdump.cpp
4755-
extern UniValue dumpprivkey(const JSONRPCRequest& request); // in rpcdump.cpp
4756-
extern UniValue importprivkey(const JSONRPCRequest& request);
4757-
extern UniValue importaddress(const JSONRPCRequest& request);
4758-
extern UniValue importpubkey(const JSONRPCRequest& request);
4759-
extern UniValue dumpwallet(const JSONRPCRequest& request);
4760-
extern UniValue importwallet(const JSONRPCRequest& request);
4761-
extern UniValue importprunedfunds(const JSONRPCRequest& request);
4762-
extern UniValue removeprunedfunds(const JSONRPCRequest& request);
4763-
extern UniValue importmulti(const JSONRPCRequest& request);
4764-
extern UniValue rescanblockchain(const JSONRPCRequest& request);
4754+
UniValue abortrescan(const JSONRPCRequest& request); // in rpcdump.cpp
4755+
UniValue dumpprivkey(const JSONRPCRequest& request); // in rpcdump.cpp
4756+
UniValue importprivkey(const JSONRPCRequest& request);
4757+
UniValue importaddress(const JSONRPCRequest& request);
4758+
UniValue importpubkey(const JSONRPCRequest& request);
4759+
UniValue dumpwallet(const JSONRPCRequest& request);
4760+
UniValue importwallet(const JSONRPCRequest& request);
4761+
UniValue importprunedfunds(const JSONRPCRequest& request);
4762+
UniValue removeprunedfunds(const JSONRPCRequest& request);
4763+
UniValue importmulti(const JSONRPCRequest& request);
47654764

47664765
static const CRPCCommand commands[] =
47674766
{ // category name actor (function) argNames

0 commit comments

Comments
 (0)