aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPavel Janík <Pavel@Janik.cz>2016-09-02 18:19:01 +0200
committerPavel Janík <Pavel@Janik.cz>2016-09-27 09:25:15 +0200
commit4731cab8fbff51a8178c85d572e2482040278616 (patch)
tree09ba06a320b4876f9318a5b9ff086e5cae9c48fe /src/test
parent2f71490d21796594ca6f55e375558944de9db5a0 (diff)
downloadbitcoin-4731cab8fbff51a8178c85d572e2482040278616.tar.xz
Do not shadow variables
Diffstat (limited to 'src/test')
-rw-r--r--src/test/crypto_tests.cpp20
-rw-r--r--src/test/net_tests.cpp4
-rw-r--r--src/test/script_tests.cpp8
3 files changed, 16 insertions, 16 deletions
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index 58a62ee022..ff0adae1d2 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -133,13 +133,13 @@ void TestAES128CBC(const std::string &hexkey, const std::string &hexiv, bool pad
{
std::vector<unsigned char> sub(i, in.end());
std::vector<unsigned char> subout(sub.size() + AES_BLOCKSIZE);
- int size = enc.Encrypt(&sub[0], sub.size(), &subout[0]);
- if (size != 0)
+ int _size = enc.Encrypt(&sub[0], sub.size(), &subout[0]);
+ if (_size != 0)
{
- subout.resize(size);
+ subout.resize(_size);
std::vector<unsigned char> subdecrypted(subout.size());
- size = dec.Decrypt(&subout[0], subout.size(), &subdecrypted[0]);
- subdecrypted.resize(size);
+ _size = dec.Decrypt(&subout[0], subout.size(), &subdecrypted[0]);
+ subdecrypted.resize(_size);
BOOST_CHECK(decrypted.size() == in.size());
BOOST_CHECK_MESSAGE(subdecrypted == sub, HexStr(subdecrypted) + std::string(" != ") + HexStr(sub));
}
@@ -174,13 +174,13 @@ void TestAES256CBC(const std::string &hexkey, const std::string &hexiv, bool pad
{
std::vector<unsigned char> sub(i, in.end());
std::vector<unsigned char> subout(sub.size() + AES_BLOCKSIZE);
- int size = enc.Encrypt(&sub[0], sub.size(), &subout[0]);
- if (size != 0)
+ int _size = enc.Encrypt(&sub[0], sub.size(), &subout[0]);
+ if (_size != 0)
{
- subout.resize(size);
+ subout.resize(_size);
std::vector<unsigned char> subdecrypted(subout.size());
- size = dec.Decrypt(&subout[0], subout.size(), &subdecrypted[0]);
- subdecrypted.resize(size);
+ _size = dec.Decrypt(&subout[0], subout.size(), &subdecrypted[0]);
+ subdecrypted.resize(_size);
BOOST_CHECK(decrypted.size() == in.size());
BOOST_CHECK_MESSAGE(subdecrypted == sub, HexStr(subdecrypted) + std::string(" != ") + HexStr(sub));
}
diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp
index 680708533e..4a7d6e778f 100644
--- a/src/test/net_tests.cpp
+++ b/src/test/net_tests.cpp
@@ -62,11 +62,11 @@ public:
}
};
-CDataStream AddrmanToStream(CAddrManSerializationMock& addrman)
+CDataStream AddrmanToStream(CAddrManSerializationMock& _addrman)
{
CDataStream ssPeersIn(SER_DISK, CLIENT_VERSION);
ssPeersIn << FLATDATA(Params().MessageStart());
- ssPeersIn << addrman;
+ ssPeersIn << _addrman;
std::string str = ssPeersIn.str();
vector<unsigned char> vchData(str.begin(), str.end());
return CDataStream(vchData, SER_DISK, CLIENT_VERSION);
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 5a9aaf9bc0..dad82baed5 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -323,10 +323,10 @@ public:
return *this;
}
- TestBuilder& Add(const CScript& script)
+ TestBuilder& Add(const CScript& _script)
{
DoPush();
- spendTx.vin[0].scriptSig += script;
+ spendTx.vin[0].scriptSig += _script;
return *this;
}
@@ -343,8 +343,8 @@ public:
return *this;
}
- TestBuilder& Push(const CScript& script) {
- DoPush(std::vector<unsigned char>(script.begin(), script.end()));
+ TestBuilder& Push(const CScript& _script) {
+ DoPush(std::vector<unsigned char>(_script.begin(), _script.end()));
return *this;
}