-
Notifications
You must be signed in to change notification settings - Fork 38.8k
build: Enable -Wredundant-decls where available. Remove redundant redeclarations. #13899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/wallet/rpcwallet.cpp
Outdated
| extern UniValue importwallet(const JSONRPCRequest& request); | ||
| extern UniValue importprunedfunds(const JSONRPCRequest& request); | ||
| extern UniValue removeprunedfunds(const JSONRPCRequest& request); | ||
| extern UniValue importmulti(const JSONRPCRequest& request); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Could remove the redundant extern as well, since you touch this block of code anyway.
|
utACK f04bb13. Shouldn't hurt with the warning enabled. |
|
@MarcoFalke Redundant |
|
utACK d56b73f |
|
utACK d56b73f could squash the first two |
|
utACK d56b73f Only tested compilation on macOS, but this shouldn't have an effect (using Clang) according to https://clang.llvm.org/docs/DiagnosticsReference.html#wredundant-decls. |
… 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
merge bitcoin#18914, bitcoin#13306, bitcoin#16424, bitcoin#13899, bitcoin#17486, bitcoin#17880, bitcoin#18145, bitcoin#18843, bitcoin#16710: split warnings out of CXXFLAGS, add more flags
… 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 # Conflicts: # configure.ac # src/wallet/rpcwallet.cpp
…ailable. Remove redundant redeclarations." This reverts commit 03fe70c.
Remove redundant redeclaration of
rescanblockchainand enable-Wredundant-decls(gcc) where available to avoid accidental redundant redeclarations.