aboutsummaryrefslogtreecommitdiff
path: root/src/test/crypto_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2019-11-20 13:42:13 -0500
committerMarcoFalke <[email protected]>2019-12-04 09:32:19 -0500
commit2222c305866a77065ab5be24c1c252bae252bb59 (patch)
tree974a099b217fb059b47cf6d17bb9db0b7c596f9b /src/test/crypto_tests.cpp
parentci: Bump to clang-8 for asan build to avoid segfaults on ppc64le (diff)
downloaddiscoin-2222c305866a77065ab5be24c1c252bae252bb59.tar.xz
discoin-2222c305866a77065ab5be24c1c252bae252bb59.zip
test: Use char instead of unsigned char
Diffstat (limited to 'src/test/crypto_tests.cpp')
-rw-r--r--src/test/crypto_tests.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index 591a317d1..2deb0c5bf 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -186,14 +186,15 @@ static void TestHKDF_SHA256_32(const std::string &ikm_hex, const std::string &sa
BOOST_CHECK(HexStr(out, out + 32) == okm_check_hex);
}
-static std::string LongTestString() {
+static std::string LongTestString()
+{
std::string ret;
- for (int i=0; i<200000; i++) {
- ret += (unsigned char)(i);
- ret += (unsigned char)(i >> 4);
- ret += (unsigned char)(i >> 8);
- ret += (unsigned char)(i >> 12);
- ret += (unsigned char)(i >> 16);
+ for (int i = 0; i < 200000; i++) {
+ ret += (char)(i);
+ ret += (char)(i >> 4);
+ ret += (char)(i >> 8);
+ ret += (char)(i >> 12);
+ ret += (char)(i >> 16);
}
return ret;
}