Avoid -Wshadow warnings in wallet_tests #9828

pull ryanofsky wants to merge 1 commits into bitcoin:master from ryanofsky:pr/multishadow changing 1 files +41 −41
  1. ryanofsky commented at 7:17 PM on February 22, 2017: member

    Warnings introduced by #9773 and reported by @paveljanik in #9773 and #9827.

  2. Avoid -Wshadow warnings in wallet_tests
    Warnings introduced by commit e2e2f4c "Return errors from importmulti if
    complete rescans are not successful" and reported by Pavel Janík
    <Pavel@Janik.cz> in https://github.com/bitcoin/bitcoin/pull/9773 and
    https://github.com/bitcoin/bitcoin/pull/9827
    
    wallet/test/wallet_tests.cpp: In member function ‘void wallet_tests::rescan::test_method()’:
    wallet/test/wallet_tests.cpp:377:17: warning: declaration of ‘wallet’ shadows a global declaration [-Wshadow]
             CWallet wallet;
    09fe346a4f
  3. paveljanik commented at 7:56 PM on February 22, 2017: contributor

    Isn't the other way shorter (ie. changing only inside blocks)?

    But anyway, this fixes the issue, yes. ACK https://github.com/bitcoin/bitcoin/pull/9828/commits/09fe346a4fb9c2b6c4f1bc1318494885708226cd

  4. ryanofsky commented at 8:02 PM on February 22, 2017: member

    The other way is shorter but would conflict with other pending prs. Also I think it is better for global variables to use longer names than locals.

  5. paveljanik commented at 8:17 PM on February 22, 2017: contributor

    @ryanofsky Yes, I agree.

  6. fanquake added the label Refactoring on Feb 22, 2017
  7. dcousens approved
  8. fanquake added the label Tests on Feb 22, 2017
  9. MarcoFalke commented at 3:25 PM on February 23, 2017: member

    utACK 09fe346, I think we should give #8808 a try.

  10. laanwj merged this on Mar 3, 2017
  11. laanwj closed this on Mar 3, 2017

  12. laanwj referenced this in commit 67c5cc1917 on Mar 3, 2017
  13. PastaPastaPasta referenced this in commit bc5f979e68 on Dec 30, 2018
  14. PastaPastaPasta referenced this in commit d14b834b8a on Dec 31, 2018
  15. PastaPastaPasta referenced this in commit d70f230de2 on Dec 31, 2018
  16. PastaPastaPasta referenced this in commit 99222193b7 on Dec 31, 2018
  17. PastaPastaPasta referenced this in commit e8f4c4424c on Jan 2, 2019
  18. PastaPastaPasta referenced this in commit 90dccc4501 on Jan 2, 2019
  19. PastaPastaPasta referenced this in commit b24654f8d3 on Jan 3, 2019
  20. PastaPastaPasta referenced this in commit 6375b25497 on Jan 21, 2019
  21. PastaPastaPasta referenced this in commit 1baf16c6fa on Jan 25, 2019
  22. PastaPastaPasta referenced this in commit 47264591a8 on Jan 29, 2019
  23. PastaPastaPasta referenced this in commit 16be8b2cf2 on Feb 1, 2019
  24. PastaPastaPasta referenced this in commit c6ae327194 on Feb 1, 2019
  25. PastaPastaPasta referenced this in commit 2c3dde75c2 on Feb 1, 2019
  26. MarcoFalke locked this on Sep 8, 2021

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-13 15:15 UTC

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