[Tests] Prevent warning: variable 'x' is uninitialized #10272

pull paveljanik wants to merge 1 commits into bitcoin:master from paveljanik:20170425_FastRandomContext_test_warnings changing 1 files +2 −2
  1. paveljanik commented at 6:49 AM on April 25, 2017: contributor

    #9792 brought a few "uninitialized" warnings:

    bench/crypto_hash.cpp:79:13: warning: variable 'x' is uninitialized when used here [-Wuninitialized]
                x += rng.rand32();
                ^
    bench/crypto_hash.cpp:76:15: note: initialize the variable 'x' to silence this warning
        uint32_t x;
                  ^
                   = 0
    bench/crypto_hash.cpp:90:13: warning: variable 'x' is uninitialized when used here [-Wuninitialized]
                x += rng.randbool();
                ^
    bench/crypto_hash.cpp:87:15: note: initialize the variable 'x' to silence this warning
        uint32_t x;
                  ^
                   = 0
    2 warnings generated.
    

    Fix them.

  2. Prevent warning: variable 'x' is uninitialized 5ec883667f
  3. fanquake added the label Tests on Apr 25, 2017
  4. laanwj commented at 6:58 AM on April 25, 2017: member

    Trivial ACK (luckily is just bench code).

  5. fanquake commented at 6:58 AM on April 25, 2017: member

    utACK 5ec8836

  6. kallewoof commented at 7:23 AM on April 25, 2017: member

    utACK 5ec883667fe6fe323fe3ae42ee54cff77450da7d

  7. laanwj merged this on Apr 25, 2017
  8. laanwj closed this on Apr 25, 2017

  9. laanwj referenced this in commit 54e2d87e79 on Apr 25, 2017
  10. PastaPastaPasta referenced this in commit 2a991ad965 on Jun 10, 2019
  11. PastaPastaPasta referenced this in commit b84bd51740 on Jun 10, 2019
  12. PastaPastaPasta referenced this in commit 2fa73af188 on Jun 11, 2019
  13. PastaPastaPasta referenced this in commit 7e4dbc3930 on Jun 11, 2019
  14. PastaPastaPasta referenced this in commit 5c9841ff64 on Jun 12, 2019
  15. PastaPastaPasta referenced this in commit 47edff3d26 on Jun 14, 2019
  16. PastaPastaPasta referenced this in commit f6c5d58029 on Jun 14, 2019
  17. PastaPastaPasta referenced this in commit b4a14eac90 on Jun 15, 2019
  18. PastaPastaPasta referenced this in commit 09b4b36287 on Jun 19, 2019
  19. barrystyle referenced this in commit b7959b22ed on Jan 22, 2020
  20. zkbot referenced this in commit aa225ebb0b on Jan 24, 2020
  21. zkbot referenced this in commit 74ff73abab on Jan 24, 2020
  22. furszy referenced this in commit 4ed15cc69d on Jun 8, 2020
  23. 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-28 00:15 UTC

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