Index: media/cast/logging/log_serializer.cc |
diff --git a/media/cast/logging/log_serializer.cc b/media/cast/logging/log_serializer.cc |
index afcf77013f3e9fbdabf93fa69a2864e2b726aa79..c5cb252d781a3bc6bee05f58c4350335e948818c 100644 |
--- a/media/cast/logging/log_serializer.cc |
+++ b/media/cast/logging/log_serializer.cc |
@@ -47,7 +47,7 @@ bool DoSerializeEvents(const LogMetadata& metadata, |
int proto_size = metadata.ByteSize(); |
DCHECK(proto_size <= kMaxSerializedProtoBytes); |
- if (!writer.WriteU16(proto_size)) |
+ if (!writer.WriteU16(static_cast<uint16>(proto_size))) |
return false; |
if (!metadata.SerializeToArray(writer.ptr(), writer.remaining())) |
return false; |
@@ -73,7 +73,7 @@ bool DoSerializeEvents(const LogMetadata& metadata, |
DCHECK(proto_size <= kMaxSerializedProtoBytes); |
// Write size of the proto, then write the proto. |
- if (!writer.WriteU16(proto_size)) |
+ if (!writer.WriteU16(static_cast<uint16>(proto_size))) |
return false; |
if (!frame_event.SerializeToArray(writer.ptr(), writer.remaining())) |
return false; |
@@ -97,7 +97,7 @@ bool DoSerializeEvents(const LogMetadata& metadata, |
DCHECK(proto_size <= kMaxSerializedProtoBytes); |
// Write size of the proto, then write the proto. |
- if (!writer.WriteU16(proto_size)) |
+ if (!writer.WriteU16(static_cast<uint16>(proto_size))) |
return false; |
if (!packet_event.SerializeToArray(writer.ptr(), writer.remaining())) |
return false; |