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

pull practicalswift wants to merge 3 commits into bitcoin:master from practicalswift:redundant-decls changing 2 files +11 −11
  1. practicalswift commented at 9:58 PM on August 6, 2018: 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)
              ^~~~~~~~~~~~~~~~
    
  2. Remove redundant redeclaration of rescanblockchain(...) in same scope a9e90e5002
  3. Enable -Wredundant-decls (gcc) if available f04bb1361c
  4. practicalswift renamed this:
    Remove redundant redeclarations. Enable -Wredundant-decls (gcc) where available.
    Remove redundant redeclarations. Enable -Wredundant-decls where available.
    on Aug 6, 2018
  5. fanquake added the label Build system on Aug 6, 2018
  6. practicalswift renamed this:
    Remove redundant redeclarations. Enable -Wredundant-decls where available.
    build: Remove redundant redeclarations. Enable -Wredundant-decls where available.
    on Aug 6, 2018
  7. practicalswift renamed this:
    build: Remove redundant redeclarations. Enable -Wredundant-decls where available.
    build: Enable -Wredundant-decls where available. Remove redundant redeclarations.
    on Aug 6, 2018
  8. in src/wallet/rpcwallet.cpp:4763 in f04bb1361c outdated
    4760 | @@ -4761,7 +4761,6 @@ extern UniValue importwallet(const JSONRPCRequest& request);
    4761 |  extern UniValue importprunedfunds(const JSONRPCRequest& request);
    4762 |  extern UniValue removeprunedfunds(const JSONRPCRequest& request);
    4763 |  extern UniValue importmulti(const JSONRPCRequest& request);
    


    MarcoFalke commented at 10:15 PM on August 6, 2018:

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

  9. MarcoFalke commented at 10:18 PM on August 6, 2018: member

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

  10. Remove redundant extern d56b73f217
  11. practicalswift commented at 7:42 AM on August 7, 2018: contributor

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

  12. ken2812221 commented at 8:17 AM on August 7, 2018: contributor

    utACK d56b73f

  13. Empact commented at 9:37 PM on August 7, 2018: member

    utACK d56b73f could squash the first two

  14. fanquake commented at 9:38 AM on August 13, 2018: 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.

  15. MarcoFalke added this to the milestone 0.18.0 on Aug 13, 2018
  16. MarcoFalke merged this on Aug 13, 2018
  17. MarcoFalke closed this on Aug 13, 2018

  18. MarcoFalke referenced this in commit 3bd25c010c on Aug 13, 2018
  19. practicalswift deleted the branch on Apr 10, 2021
  20. kittywhiskers referenced this in commit d136cc0add on Jun 17, 2021
  21. kittywhiskers referenced this in commit 9452deaebd on Jun 17, 2021
  22. kittywhiskers referenced this in commit 8dbe886202 on Jun 17, 2021
  23. UdjinM6 referenced this in commit 988fa6a235 on Jun 23, 2021
  24. Munkybooty referenced this in commit 03fe70c94b on Jun 28, 2021
  25. Munkybooty referenced this in commit 7cd52ae511 on Jun 28, 2021
  26. UdjinM6 referenced this in commit 8851037dbb on Jun 28, 2021
  27. Munkybooty referenced this in commit 73838b5601 on Jun 29, 2021
  28. gades referenced this in commit 3bd071e466 on May 9, 2022
  29. DrahtBot locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me