aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/timestamp.pb.cc
diff options
context:
space:
mode:
authorGravatar Bo Yang <teboring@google.com>2017-06-23 12:56:44 -0700
committerGravatar Bo Yang <paulyang1211@gmail.com>2017-06-24 11:28:13 -0700
commite3c807d4e752b477b707f5d021264faf9b127304 (patch)
tree505092dff769b14d6a07be62314bc948b9398090 /src/google/protobuf/timestamp.pb.cc
parent9c0b35cf620c4904a18e25733f50c9c0474fefa6 (diff)
Fix more implicit type conversions in public headers and generated code.
Diffstat (limited to 'src/google/protobuf/timestamp.pb.cc')
-rw-r--r--src/google/protobuf/timestamp.pb.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/google/protobuf/timestamp.pb.cc b/src/google/protobuf/timestamp.pb.cc
index b2fe28a4..80ddc5bf 100644
--- a/src/google/protobuf/timestamp.pb.cc
+++ b/src/google/protobuf/timestamp.pb.cc
@@ -164,14 +164,15 @@ Timestamp::Timestamp(const Timestamp& from)
_cached_size_(0) {
_internal_metadata_.MergeFrom(from._internal_metadata_);
::memcpy(&seconds_, &from.seconds_,
- reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_) + sizeof(nanos_));
+ static_cast<size_t>(reinterpret_cast<char*>(&nanos_) -
+ reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
// @@protoc_insertion_point(copy_constructor:google.protobuf.Timestamp)
}
void Timestamp::SharedCtor() {
- ::memset(&seconds_, 0, reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_) + sizeof(nanos_));
+ ::memset(&seconds_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&nanos_) -
+ reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
_cached_size_ = 0;
}
@@ -215,8 +216,9 @@ Timestamp* Timestamp::New(::google::protobuf::Arena* arena) const {
void Timestamp::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp)
- ::memset(&seconds_, 0, reinterpret_cast<char*>(&nanos_) -
- reinterpret_cast<char*>(&seconds_) + sizeof(nanos_));
+ ::memset(&seconds_, 0, static_cast<size_t>(
+ reinterpret_cast<char*>(&nanos_) -
+ reinterpret_cast<char*>(&seconds_)) + sizeof(nanos_));
}
bool Timestamp::MergePartialFromCodedStream(