summaryrefslogtreecommitdiffstats
path: root/src/lib/dns/tests/unittest_util.cc
diff options
context:
space:
mode:
authorStephen Morris <stephen@isc.org>2011-12-12 18:09:00 +0100
committerStephen Morris <stephen@isc.org>2011-12-12 18:09:00 +0100
commitbf2e60ca2a5bd14d057c5ad292b752e980d9637b (patch)
tree74d604b1fcc6cadde5b1090341cb893073cd314e /src/lib/dns/tests/unittest_util.cc
parent[1470] Qualify "error_code" (diff)
downloadkea-bf2e60ca2a5bd14d057c5ad292b752e980d9637b.tar.xz
kea-bf2e60ca2a5bd14d057c5ad292b752e980d9637b.zip
[1470] Change some loop indexes to unsigned values
Some loops changed to use unsigned loop indexes to avoid warning messages from some compilers.
Diffstat (limited to 'src/lib/dns/tests/unittest_util.cc')
-rw-r--r--src/lib/dns/tests/unittest_util.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/dns/tests/unittest_util.cc b/src/lib/dns/tests/unittest_util.cc
index c9c09826ad..ca9d34719f 100644
--- a/src/lib/dns/tests/unittest_util.cc
+++ b/src/lib/dns/tests/unittest_util.cc
@@ -116,7 +116,7 @@ UnitTestUtil::readWireData(const string& datastr,
throw runtime_error(err_oss.str());
}
- for (int pos = 0; pos < bytes.size(); pos += 2) {
+ for (string::size_type pos = 0; pos < bytes.size(); pos += 2) {
istringstream iss_byte(bytes.substr(pos, 2));
unsigned int ch;
@@ -139,7 +139,7 @@ UnitTestUtil::matchWireData(const char*, const char*, const char*, const char*,
::testing::Message msg;
size_t cmplen = min(len1, len2);
- for (int i = 0; i < cmplen; i++) {
+ for (size_t i = 0; i < cmplen; i++) {
int ch1 = static_cast<const uint8_t*>(data1)[i];
int ch2 = static_cast<const uint8_t*>(data2)[i];
if (ch1 != ch2) {