From 8dbe88620291496dd50db5335f0ebb5ccab76e3d Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com> Date: Thu, 17 Jun 2021 19:54:51 +0530 Subject: [PATCH] bitcoin#13899: Enable -Wredundant-decls (gcc) if available --- configure.ac | 1 + src/wallet/rpcwallet.cpp | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 631a09f379..1c506cf2e8 100644 --- a/configure.ac +++ b/configure.ac @@ -375,6 +375,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],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety"],,[[$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 diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d3a6184e72..e47ba9d192 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4341,20 +4341,20 @@ static UniValue listlabels(const JSONRPCRequest& request) return ret; } -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); -extern UniValue rescanblockchain(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); +UniValue rescanblockchain(const JSONRPCRequest& request); -extern UniValue dumphdinfo(const JSONRPCRequest& request); -extern UniValue importelectrumwallet(const JSONRPCRequest& request); +UniValue dumphdinfo(const JSONRPCRequest& request); +UniValue importelectrumwallet(const JSONRPCRequest& request); static const CRPCCommand commands[] = { // category name actor (function) argNames