util: rename variable to avoid shadowing #10010

pull prusnak wants to merge 1 commits into bitcoin:master from prusnak:master changing 1 files +2 −2
  1. prusnak commented at 4:38 PM on March 16, 2017: contributor

    This avoids triggering the following warning (appears almost everywhere where this macro is used):

    In file included from rpc/protocol.cpp:10:0:
    rpc/protocol.cpp: In function ‘void DeleteAuthCookie()’:
    ./util.h:83:40: warning: declaration of ‘e’ shadows a previous local [-Wshadow]
         } catch (tinyformat::format_error &e) { \
                                            ^
    rpc/protocol.cpp:123:9: note: in expansion of macro ‘LogPrintf’
             LogPrintf("%s: Unable to remove random auth cookie file: %s\n", __func__, e.what());
             ^~~~~~~~~
    rpc/protocol.cpp:122:57: note: shadowed declaration is here
         } catch (const boost::filesystem::filesystem_error& e) {
                                                             ^
    
  2. util: rename variable to avoid shadowing 9350e13396
  3. laanwj commented at 4:49 PM on March 16, 2017: member

    Is this already covered by #9911?

  4. prusnak commented at 4:51 PM on March 16, 2017: contributor

    No, it's not.

  5. laanwj commented at 5:11 PM on March 16, 2017: member

    #10009 then? There's too many WShadow pulls open...

  6. prusnak commented at 5:16 PM on March 16, 2017: contributor

    Yes, it is present in #10009 - https://github.com/bitcoin/bitcoin/pull/10009/commits/3df45c674817776dd95f5188a6010e3305290a93#diff-772f489c7d0a32de3badbfbcb5fd200dR83

    Have not noticed the other PR before, sorry. But it makes lots of other (rather questionable) stuff, anyway.

  7. laanwj commented at 5:36 PM on March 16, 2017: member

    @prusnak I agree, this one seems cleaner. Closing the other one.

  8. laanwj cross-referenced this on Mar 16, 2017 from issue [trivial] Fixed -Wshadow warnings by tjps
  9. dcousens approved
  10. MarcoFalke commented at 11:51 PM on March 16, 2017: member

    utACK 9350e13

  11. fanquake added the label Refactoring on Mar 17, 2017
  12. laanwj merged this on Mar 17, 2017
  13. laanwj closed this on Mar 17, 2017

  14. laanwj referenced this in commit fcf556f7e9 on Mar 17, 2017
  15. laanwj cross-referenced this on Feb 10, 2019 from issue build: Disallow shadowing variables via -isystem, -Wshadow by Empact
  16. PastaPastaPasta referenced this in commit 0499ec951e on Mar 10, 2019
  17. PastaPastaPasta referenced this in commit f1126a465b on Mar 10, 2019
  18. PastaPastaPasta referenced this in commit 79559c7792 on Mar 11, 2019
  19. PastaPastaPasta referenced this in commit d6784731f4 on Mar 11, 2019
  20. PastaPastaPasta referenced this in commit cd408adbf1 on Mar 12, 2019
  21. PastaPastaPasta referenced this in commit f5c19ec694 on Mar 13, 2019
  22. UdjinM6 referenced this in commit 6d1344b733 on Mar 13, 2019
  23. PastaPastaPasta referenced this in commit fc2ce2a220 on Mar 13, 2019
  24. PastaPastaPasta referenced this in commit de8c38ef80 on Mar 14, 2019
  25. PastaPastaPasta referenced this in commit 706e4655aa on Mar 14, 2019
  26. PastaPastaPasta referenced this in commit 55ca7942ec on Mar 15, 2019
  27. PastaPastaPasta referenced this in commit 11b3893696 on Mar 16, 2019
  28. PastaPastaPasta referenced this in commit 1620587fc6 on Apr 3, 2019
  29. PastaPastaPasta referenced this in commit 58f5347a95 on Apr 3, 2019
  30. PastaPastaPasta referenced this in commit 89f8ae7a74 on Apr 5, 2019
  31. PastaPastaPasta referenced this in commit ae9ca8459d on May 6, 2019
  32. deadalnix referenced this in commit e87be9ab69 on Jan 21, 2020
  33. barrystyle referenced this in commit af6c0d7acc on Jan 22, 2020
  34. bitcoin 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-05-20 06:55 UTC