Avoid printing incorrect block indexing time due to uninitialized variable #10714

pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:avoid-uninitialized-nStart changing 1 files +3 −1
  1. practicalswift commented at 8:01 PM on July 2, 2017: contributor

    Avoid printing incorrect block indexing time due to uninitialized variable.

    Fixes:

    init.cpp: In function ‘bool AppInitMain(boost::thread_group&, CScheduler&)’:
    init.cpp:1499:56: warning: ‘nStart’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart);
                                                            ^
    

    In this fix I've assumed that block indexing time is only relevant to print in case of fLoaded. Let me know if that assumption is incorrect.

  2. Avoid printing incorrect block indexing time due to uninitialized variable
    Fixes:
    
    init.cpp: In function ‘bool AppInitMain(boost::thread_group&, CScheduler&)’:
    init.cpp:1499:56: warning: ‘nStart’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart);
                                                            ^
    959dd8781e
  3. TheBlueMatt commented at 6:27 PM on July 7, 2017: member

    utACK

  4. jonasschnelli added the label Refactoring on Jul 7, 2017
  5. gmaxwell approved
  6. gmaxwell commented at 11:34 AM on July 9, 2017: contributor

    utACK looks like the correct fix to me

  7. jnewbery commented at 4:38 PM on July 10, 2017: member

    Tested ACK 959dd8781ed8982df06b52dd3cecc996cf30f76d.

  8. sipa merged this on Jul 12, 2017
  9. sipa closed this on Jul 12, 2017

  10. sipa referenced this in commit 2a09a3891f on Jul 12, 2017
  11. PastaPastaPasta referenced this in commit baa4ac15ee on Jul 6, 2019
  12. PastaPastaPasta referenced this in commit 563d9af96c on Jul 6, 2019
  13. PastaPastaPasta referenced this in commit a201bd0cdf on Jul 8, 2019
  14. PastaPastaPasta referenced this in commit 2fca9c2eaf on Jul 9, 2019
  15. PastaPastaPasta referenced this in commit 381d1469bb on Jul 11, 2019
  16. PastaPastaPasta referenced this in commit 9fc51ac509 on Jul 13, 2019
  17. PastaPastaPasta referenced this in commit b0e23ddfce on Jul 17, 2019
  18. PastaPastaPasta referenced this in commit 94828dbdcc on Jul 17, 2019
  19. PastaPastaPasta referenced this in commit 28197ef742 on Jul 18, 2019
  20. barrystyle referenced this in commit 786642e2a0 on Jan 22, 2020
  21. practicalswift deleted the branch on Apr 10, 2021
  22. 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-13 21:15 UTC

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