From a9e90e500228f96935649234ed1f446668d9d9d4 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 6 Aug 2018 23:52:35 +0200 Subject: [PATCH 1/3] Remove redundant redeclaration of rescanblockchain(...) in same scope --- src/wallet/rpcwallet.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 73dfebf11..4817e9e4d 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4761,7 +4761,6 @@ extern UniValue importwallet(const JSONRPCRequest& request); extern UniValue importprunedfunds(const JSONRPCRequest& request); extern UniValue removeprunedfunds(const JSONRPCRequest& request); extern UniValue importmulti(const JSONRPCRequest& request); -extern UniValue rescanblockchain(const JSONRPCRequest& request); static const CRPCCommand commands[] = { // category name actor (function) argNames From f04bb1361ccac2a4351fb058c5ca408b00bfd901 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Mon, 6 Aug 2018 23:53:01 +0200 Subject: [PATCH 2/3] Enable -Wredundant-decls (gcc) if available --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 5851413cf..287646f04 100644 --- a/configure.ac +++ b/configure.ac @@ -303,6 +303,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]]) AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]]) + AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]]) ## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all ## unknown options if any other warning is produced. Test the -Wfoo case, and From d56b73f21768585615c06f5d14d526b9ff1eec73 Mon Sep 17 00:00:00 2001 From: practicalswift Date: Tue, 7 Aug 2018 09:34:45 +0200 Subject: [PATCH 3/3] Remove redundant extern --- src/wallet/rpcwallet.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 4817e9e4d..a9b03685a 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4751,16 +4751,16 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request) return result; } -extern UniValue abortrescan(const JSONRPCRequest& request); // in rpcdump.cpp -extern UniValue dumpprivkey(const JSONRPCRequest& request); // in rpcdump.cpp -extern UniValue importprivkey(const JSONRPCRequest& request); -extern UniValue importaddress(const JSONRPCRequest& request); -extern UniValue importpubkey(const JSONRPCRequest& request); -extern UniValue dumpwallet(const JSONRPCRequest& request); -extern UniValue importwallet(const JSONRPCRequest& request); -extern UniValue importprunedfunds(const JSONRPCRequest& request); -extern UniValue removeprunedfunds(const JSONRPCRequest& request); -extern UniValue importmulti(const JSONRPCRequest& request); +UniValue abortrescan(const JSONRPCRequest& request); // in rpcdump.cpp +UniValue dumpprivkey(const JSONRPCRequest& request); // in rpcdump.cpp +UniValue importprivkey(const JSONRPCRequest& request); +UniValue importaddress(const JSONRPCRequest& request); +UniValue importpubkey(const JSONRPCRequest& request); +UniValue dumpwallet(const JSONRPCRequest& request); +UniValue importwallet(const JSONRPCRequest& request); +UniValue importprunedfunds(const JSONRPCRequest& request); +UniValue removeprunedfunds(const JSONRPCRequest& request); +UniValue importmulti(const JSONRPCRequest& request); static const CRPCCommand commands[] = { // category name actor (function) argNames