HomePhabricator

fix compiler warning "Declaration shadows a local variable"

Description

fix compiler warning "Declaration shadows a local variable"

Summary:
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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10116

Details

Provenance
PiRKAuthored on Sep 14 2021, 16:08
PiRKPushed on Sep 15 2021, 06:58
Reviewer
Restricted Project
Differential Revision
D10116: fix compiler warning "Declaration shadows a local variable"
Parents
rABCdaa90b8b1b47: doc: Fix getmempoolancestor RPC result doc
Branches
Unknown
Tags
Unknown