Skip to content

Conversation

paveljanik
Copy link
Contributor

Minor cleanup after 56c87e9

@@ -996,10 +996,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
return InitError(strprintf("Invalid nTimeout (%s)", vDeploymentParams[2]));
}
bool found = false;
for (int i=0; i<(int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++i)
for (int j=0; j<(int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

@paveljanik paveljanik Aug 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@btcdrak: See #8105. There is auto i a few lines above: https://github.com/bitcoin/bitcoin/blob/master/src/init.cpp#L985

The warning issued is:

init.cpp:999:22: warning: declaration shadows a local variable [-Wshadow]
            for (int i=0; i<(int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++i)
                     ^
init.cpp:985:19: note: previous declaration is here
        for (auto i : deployments) {
                  ^

@paveljanik paveljanik changed the title BIP9 parameters on regtest cleanup Trivial: BIP9 parameters on regtest cleanup Aug 2, 2016
@paveljanik paveljanik changed the title Trivial: BIP9 parameters on regtest cleanup [Trivial] BIP9 parameters on regtest cleanup Aug 2, 2016
@NicolasDorier
Copy link
Contributor

utACK 0fc00be

@maflcko maflcko added the Docs label Aug 2, 2016
@maflcko
Copy link
Member

maflcko commented Aug 2, 2016

utACK 0fc00be

@sipa
Copy link
Member

sipa commented Aug 2, 2016

utACK 0fc00be

@laanwj
Copy link
Member

laanwj commented Aug 3, 2016

utACK 0fc00be

@laanwj laanwj merged commit 0fc00be into bitcoin:master Aug 3, 2016
laanwj added a commit that referenced this pull request Aug 3, 2016
0fc00be Do not shadow previous local variable (Pavel Janík)
115265b Trivial: bip -> BIP in help text and comment (Pavel Janík)
codablock pushed a commit to codablock/dash that referenced this pull request Feb 8, 2018
0fc00be Do not shadow previous local variable (Pavel Janík)
115265b Trivial: bip -> BIP in help text and comment (Pavel Janík)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
0fc00be Do not shadow previous local variable (Pavel Janík)
115265b Trivial: bip -> BIP in help text and comment (Pavel Janík)
CryptoCentric pushed a commit to absolute-community/absolute that referenced this pull request Feb 28, 2019
0fc00be Do not shadow previous local variable (Pavel Janík)
115265b Trivial: bip -> BIP in help text and comment (Pavel Janík)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants