diff --git a/cpp/src/phonenumberutil.cc b/cpp/src/phonenumberutil.cc index 7625d912d..a333f9270 100644 --- a/cpp/src/phonenumberutil.cc +++ b/cpp/src/phonenumberutil.cc @@ -1925,7 +1925,7 @@ bool PhoneNumberUtil::MaybeStripExtension(string* number, string* extension) // characters long. int PhoneNumberUtil::ExtractCountryCode(string* national_number) const { int potential_country_code; - for (int i = 1; i <= kMaxLengthCountryCode; ++i) { + for (size_t i = 1; i <= kMaxLengthCountryCode; ++i) { safe_strto32(national_number->substr(0, i), &potential_country_code); string region_code; GetRegionCodeForCountryCode(potential_country_code, ®ion_code); diff --git a/cpp/src/phonenumberutil.h b/cpp/src/phonenumberutil.h index 859c45c16..26f8bcfa3 100644 --- a/cpp/src/phonenumberutil.h +++ b/cpp/src/phonenumberutil.h @@ -517,7 +517,7 @@ class PhoneNumberUtil : public Singleton { static const size_t kMinLengthForNsn = 3; static const size_t kMaxLengthForNsn = 15; // The maximum length of the country calling code. - static const int kMaxLengthCountryCode = 3; + static const size_t kMaxLengthCountryCode = 3; static const char kPlusChars[]; // Regular expression of acceptable punctuation found in phone numbers. This diff --git a/cpp/src/regexp_cache.h b/cpp/src/regexp_cache.h index af9372539..7670824f7 100644 --- a/cpp/src/regexp_cache.h +++ b/cpp/src/regexp_cache.h @@ -70,7 +70,6 @@ class RegExpCache { base::Lock lock_; // protects cache_impl_ scoped_ptr cache_impl_; // protected by lock_ friend class RegExpCacheTest_CacheConstructor_Test; - friend class RegExpCacheTest_AccessConstructor_Test; DISALLOW_COPY_AND_ASSIGN(RegExpCache); };