From 4cbbf33b773fb95aa339ee50517fd375f5120ffe Mon Sep 17 00:00:00 2001 From: Jisi Liu Date: Thu, 3 Aug 2017 11:13:25 -0700 Subject: Fix invalid offsetof warning. Use composition instead of inheritance for oneof default. --- src/google/protobuf/field_mask.pb.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/google/protobuf/field_mask.pb.cc') diff --git a/src/google/protobuf/field_mask.pb.cc b/src/google/protobuf/field_mask.pb.cc index 60e3056b..6e867037 100644 --- a/src/google/protobuf/field_mask.pb.cc +++ b/src/google/protobuf/field_mask.pb.cc @@ -19,7 +19,10 @@ namespace google { namespace protobuf { -class FieldMaskDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed { +class FieldMaskDefaultTypeInternal { +public: + ::google::protobuf::internal::ExplicitlyConstructed + _instance; } _FieldMask_default_instance_; namespace protobuf_google_2fprotobuf_2ffield_5fmask_2eproto { @@ -87,7 +90,7 @@ void TableStruct::InitDefaultsImpl() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::internal::InitProtobufDefaults(); - _FieldMask_default_instance_.DefaultConstruct(); + _FieldMask_default_instance_._instance.DefaultConstruct(); ::google::protobuf::internal::OnShutdownDestroyMessage( &_FieldMask_default_instance_);} -- cgit v1.2.3