Skip to content

Conversation

@practicalswift
Copy link
Contributor

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)
          ^~~~~~~~~~~~~~~~

@practicalswift practicalswift changed the title Remove redundant redeclarations. Enable -Wredundant-decls (gcc) where available. Remove redundant redeclarations. Enable -Wredundant-decls where available. Aug 6, 2018
@practicalswift practicalswift changed the title Remove redundant redeclarations. Enable -Wredundant-decls where available. build: Remove redundant redeclarations. Enable -Wredundant-decls where available. Aug 6, 2018
@practicalswift practicalswift changed the title build: Remove redundant redeclarations. Enable -Wredundant-decls where available. build: Enable -Wredundant-decls where available. Remove redundant redeclarations. Aug 6, 2018
extern UniValue importwallet(const JSONRPCRequest& request);
extern UniValue importprunedfunds(const JSONRPCRequest& request);
extern UniValue removeprunedfunds(const JSONRPCRequest& request);
extern UniValue importmulti(const JSONRPCRequest& request);
Copy link
Member

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.

@maflcko
Copy link
Member

maflcko commented Aug 6, 2018

utACK f04bb13. Shouldn't hurt with the warning enabled.

@practicalswift
Copy link
Contributor Author

@MarcoFalke Redundant extern removed. Please re-review :-)

@ken2812221
Copy link
Contributor

utACK d56b73f

@Empact
Copy link
Contributor

Empact commented Aug 7, 2018

utACK d56b73f could squash the first two

@fanquake
Copy link
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 maflcko added this to the 0.18.0 milestone Aug 13, 2018
@maflcko maflcko merged commit d56b73f into bitcoin:master Aug 13, 2018
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
@practicalswift practicalswift deleted the redundant-decls branch April 10, 2021 19:35
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
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Aug 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants