aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/wire_format_lite_inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/wire_format_lite_inl.h')
-rw-r--r--src/google/protobuf/wire_format_lite_inl.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/google/protobuf/wire_format_lite_inl.h b/src/google/protobuf/wire_format_lite_inl.h
index f7b98d1d..c044def8 100644
--- a/src/google/protobuf/wire_format_lite_inl.h
+++ b/src/google/protobuf/wire_format_lite_inl.h
@@ -696,7 +696,7 @@ inline uint8* WireFormatLite::WriteFixedNoTagToArray(
const T* ii = value.unsafe_data();
const int bytes = n * static_cast<int>(sizeof(ii[0]));
- memcpy(target, ii, bytes);
+ memcpy(target, ii, static_cast<size_t>(bytes));
return target + bytes;
#else
return WritePrimitiveNoTagToArray(value, Writer, target);
@@ -954,7 +954,7 @@ inline uint8* WireFormatLite::InternalWriteMessageToArray(
uint8* target) {
target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
target = io::CodedOutputStream::WriteVarint32ToArray(
- value.GetCachedSize(), target);
+ static_cast<uint32>(value.GetCachedSize()), target);
return value.InternalSerializeWithCachedSizesToArray(deterministic, target);
}
@@ -975,7 +975,9 @@ inline uint8* WireFormatLite::InternalWriteMessageNoVirtualToArray(
bool deterministic, uint8* target) {
target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
target = io::CodedOutputStream::WriteVarint32ToArray(
- value.MessageType_WorkAroundCppLookupDefect::GetCachedSize(), target);
+ static_cast<uint32>(
+ value.MessageType_WorkAroundCppLookupDefect::GetCachedSize()),
+ target);
return value.MessageType_WorkAroundCppLookupDefect::
InternalSerializeWithCachedSizesToArray(deterministic, target);
}