aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/repeated_field.h
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-08-26 13:10:05 -0700
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-08-26 13:10:05 -0700
commit276ce8c15b530d3326229611bf787c8b599dcf03 (patch)
treef6ee1a64ad8804049aaa28948508a74c5212ee65 /src/google/protobuf/repeated_field.h
parent66b074f4919d726b97023bc56a657f5676c76323 (diff)
add static cast to silence signedness comparison warning
Diffstat (limited to 'src/google/protobuf/repeated_field.h')
-rw-r--r--src/google/protobuf/repeated_field.h2
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.";