build: Enable -Wredundant-decls where available. Remove redundant redeclarations.#13899
Merged
maflcko merged 3 commits intobitcoin:masterfrom Aug 13, 2018
Merged
build: Enable -Wredundant-decls where available. Remove redundant redeclarations.#13899maflcko merged 3 commits intobitcoin:masterfrom
maflcko merged 3 commits intobitcoin:masterfrom
Conversation
maflcko
reviewed
Aug 6, 2018
src/wallet/rpcwallet.cpp
Outdated
| @@ -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); | |||
Member
There was a problem hiding this comment.
nit: Could remove the redundant extern as well, since you touch this block of code anyway.
Member
|
utACK f04bb13. Shouldn't hurt with the warning enabled. |
Contributor
Author
|
@MarcoFalke Redundant |
Contributor
|
utACK d56b73f |
Contributor
|
utACK d56b73f could squash the first two |
Member
|
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. |
maflcko
pushed a commit
that referenced
this pull request
Aug 13, 2018
… 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
kwvg
added a commit
to kwvg/dash
that referenced
this pull request
Jun 17, 2021
UdjinM6
added a commit
to dashpay/dash
that referenced
this pull request
Jun 23, 2021
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
Munkybooty
pushed a commit
to Munkybooty/dash
that referenced
this pull request
Jun 28, 2021
… 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
UdjinM6
added a commit
to UdjinM6/dash
that referenced
this pull request
Jun 28, 2021
…ailable. Remove redundant redeclarations." This reverts commit 03fe70c.
gades
pushed a commit
to cosanta/cosanta-core
that referenced
this pull request
May 9, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove redundant redeclaration of
rescanblockchainand enable-Wredundant-decls(gcc) where available to avoid accidental redundant redeclarations.