From 113a08c9291a8a723458f4426312e9c5add61139 Mon Sep 17 00:00:00 2001 From: kailiu Date: Thu, 26 Dec 2013 15:47:07 -0800 Subject: [PATCH] Fix [-Werror=sign-compare] in autovector_test --- util/autovector_test.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/autovector_test.cc b/util/autovector_test.cc index 31ce4ed19..67fb67b05 100644 --- a/util/autovector_test.cc +++ b/util/autovector_test.cc @@ -147,7 +147,8 @@ TEST(AutoVectorTest, Iterators) { } pos = vec.begin(); - for (size_t i = 0; i < vec.size(); i += 2) { + typedef autovector::difference_type diff_type; + for (diff_type i = 0; i < vec.size(); i += 2) { // Cannot use ASSERT_EQ since that macro depends on iostream serialization ASSERT_TRUE(pos + 2 - 2 == pos); pos += 2;