Page MenuHomePhabricator

fix compiler warning "Declaration shadows a local variable"

Authored by PiRK on Sep 14 2021, 16:15.



In D9886, the round variable was shadowed by the local loop variable
of the same name. Calling this loop variable r and removing the
intermediate variable uint64_t r gets rid of the warning while simplifying the
code even more. And it restores the previous behavior of assigning a value to the
round variable, which is used after the for loop is finished on line 876.

Test Plan

ninja check

Event Timeline

PiRK requested review of this revision.Sep 14 2021, 16:15

Failed tests logs:

====== Bitcoin ABC functional tests with the next upgrade activated: ======

------- Stdout: -------
2021-09-14T16:20:34.895000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210914_162034/wallet_groups_2
2021-09-14T16:21:41.661000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/", line 128, in main
  File "/work/test/functional/", line 117, in run_test
  File "/work/test/functional/test_framework/", line 610, in sync_all
  File "/work/test/functional/test_framework/", line 580, in sync_mempools
    "".join("\n  {!r}".format(m) for m in pool),
AssertionError: Mempool sync timed out after 60s:
2021-09-14T16:21:41.712000Z TestFramework (INFO): Stopping nodes
2021-09-14T16:21:42.016000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210914_162034/wallet_groups_2
2021-09-14T16:21:42.016000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210914_162034/wallet_groups_2/test_framework.log
2021-09-14T16:21:42.016000Z TestFramework (ERROR): 
2021-09-14T16:21:42.016000Z TestFramework (ERROR): Hint: Call /work/test/functional/ '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210914_162034/wallet_groups_2' to consolidate all logs
2021-09-14T16:21:42.016000Z TestFramework (ERROR): 
2021-09-14T16:21:42.016000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2021-09-14T16:21:42.016000Z TestFramework (ERROR):
2021-09-14T16:21:42.016000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests with the next upgrade activated:

PiRK planned changes to this revision.Sep 15 2021, 06:13

test failing

rebase (unrelated failure)

This revision is now accepted and ready to land.Sep 15 2021, 06:16