Skip to content
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

build: Enable -Wredundant-decls where available. Remove redundant redeclarations. #13899

Merged
merged 3 commits into from Aug 13, 2018

Conversation

@practicalswift
Copy link
Contributor

@practicalswift practicalswift commented Aug 6, 2018

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
@@ -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);
Copy link
Member

@MarcoFalke MarcoFalke Aug 6, 2018

nit: Could remove the redundant extern as well, since you touch this block of code anyway.

@MarcoFalke
Copy link
Member

@MarcoFalke MarcoFalke commented Aug 6, 2018

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

@practicalswift
Copy link
Contributor Author

@practicalswift practicalswift commented Aug 7, 2018

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

@ken2812221
Copy link
Contributor

@ken2812221 ken2812221 commented Aug 7, 2018

utACK d56b73f

@Empact
Copy link
Member

@Empact Empact commented Aug 7, 2018

utACK d56b73f could squash the first two

@fanquake
Copy link
Member

@fanquake fanquake commented Aug 13, 2018

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.

@MarcoFalke MarcoFalke added this to the 0.18.0 milestone Aug 13, 2018
@MarcoFalke MarcoFalke merged commit d56b73f into bitcoin:master Aug 13, 2018
1 check passed
MarcoFalke added a commit that referenced this issue 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 Apr 10, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Jun 17, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Jun 17, 2021
kittywhiskers added a commit to kittywhiskers/dash that referenced this issue Jun 17, 2021
UdjinM6 added a commit to dashpay/dash that referenced this issue Jun 23, 2021
Munkybooty added a commit to Munkybooty/dash that referenced this issue 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
Munkybooty added a commit to Munkybooty/dash that referenced this issue 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 issue Jun 28, 2021
…ailable. Remove redundant redeclarations."

This reverts commit 03fe70c.
Munkybooty added a commit to Munkybooty/dash that referenced this issue Jun 29, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants