diff options
author | Feng Xiao <xiaofeng@google.com> | 2015-08-26 13:17:22 -0700 |
---|---|---|
committer | Feng Xiao <xiaofeng@google.com> | 2015-08-26 13:17:22 -0700 |
commit | 11e36b1c39d5bee92c7a0d76e95523987af5c312 (patch) | |
tree | f6ee1a64ad8804049aaa28948508a74c5212ee65 | |
parent | 66b074f4919d726b97023bc56a657f5676c76323 (diff) | |
parent | 276ce8c15b530d3326229611bf787c8b599dcf03 (diff) |
Merge pull request #747 from jtattermusch/sign_mismatch
add static cast to silence signedness comparison warning
-rw-r--r-- | src/google/protobuf/repeated_field.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h index b42d4790..137b29be 100644 --- a/src/google/protobuf/repeated_field.h +++ b/src/google/protobuf/repeated_field.h @@ -1223,7 +1223,7 @@ void RepeatedField<Element>::Reserve(int new_size) { Arena* arena = GetArenaNoVirtual(); new_size = max(google::protobuf::internal::kMinRepeatedFieldAllocationSize, max(total_size_ * 2, new_size)); - GOOGLE_CHECK_LE(new_size, + GOOGLE_CHECK_LE(static_cast<size_t>(new_size), (std::numeric_limits<size_t>::max() - kRepHeaderSize) / sizeof(Element)) << "Requested size is too large to fit into size_t."; |