diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-05-09 03:48:14 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-05-09 03:48:30 +0200 |
commit | f621326c24791be14aa61221f7e35530378b84d8 (patch) | |
tree | 447995abd684e0fa74804aa5df76bd14417250c3 /src/test | |
parent | 781fc2c8c0972764e61dafda6fa82b7fd2a198f2 (diff) |
Clean up warnings
* Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters
* Remove xCXXFLAGS usage in makefile.unix
* Fix several recent and older sign-compare warnings
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/base58_tests.cpp | 4 | ||||
-rw-r--r-- | src/test/base64_tests.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp index d52ac74982..de4096cd39 100644 --- a/src/test/base58_tests.cpp +++ b/src/test/base58_tests.cpp @@ -67,7 +67,7 @@ const char *vstrOut[] = { BOOST_AUTO_TEST_CASE(base58_EncodeBase58) { - for (int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) + for (unsigned int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) { BOOST_CHECK_EQUAL(EncodeBase58(vstrIn[i].data, vstrIn[i].data + vstrIn[i].size), vstrOut[i]); } @@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE(base58_EncodeBase58) BOOST_AUTO_TEST_CASE(base58_DecodeBase58) { std::vector<unsigned char> result; - for (int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) + for (unsigned int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) { std::vector<unsigned char> expected(vstrIn[i].data, vstrIn[i].data + vstrIn[i].size); BOOST_CHECK(DecodeBase58(vstrOut[i], result)); diff --git a/src/test/base64_tests.cpp b/src/test/base64_tests.cpp index fff30ef5eb..c5a053e2eb 100644 --- a/src/test/base64_tests.cpp +++ b/src/test/base64_tests.cpp @@ -10,7 +10,7 @@ BOOST_AUTO_TEST_CASE(base64_testvectors) { static const std::string vstrIn[] = {"","f","fo","foo","foob","fooba","foobar"}; static const std::string vstrOut[] = {"","Zg==","Zm8=","Zm9v","Zm9vYg==","Zm9vYmE=","Zm9vYmFy"}; - for (int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) + for (unsigned int i=0; i<sizeof(vstrIn)/sizeof(vstrIn[0]); i++) { std::string strEnc = EncodeBase64(vstrIn[i]); BOOST_CHECK(strEnc == vstrOut[i]); |