diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2014-11-25 11:46:39 -0800 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2014-11-25 11:46:39 -0800 |
commit | 7f3a25bebdcf732d7f43518c9b03a5a92b4be9e1 (patch) | |
tree | b0f53bcf6b1fcf6fc393a4e6e8681bfd3d5229e1 /src | |
parent | 99aa0f9e8f1a88def7bdebf1385678559cda0707 (diff) | |
parent | dd449e1c79835832f7ef01cd7df7ccb20f7cfa93 (diff) | |
download | protobuf-7f3a25bebdcf732d7f43518c9b03a5a92b4be9e1.tar.gz protobuf-7f3a25bebdcf732d7f43518c9b03a5a92b4be9e1.tar.bz2 protobuf-7f3a25bebdcf732d7f43518c9b03a5a92b4be9e1.zip |
Merge pull request #103 from Ang3lus/master
Fix "anonymous types declared in an anonymous union are an extension" warning when using clang with -pedantic switch
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/unknown_field_set.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/google/protobuf/unknown_field_set.h b/src/google/protobuf/unknown_field_set.h index 6f7a9fdb..e8c0a13c 100644 --- a/src/google/protobuf/unknown_field_set.h +++ b/src/google/protobuf/unknown_field_set.h @@ -224,13 +224,16 @@ class LIBPROTOBUF_EXPORT UnknownField { uint32 number_; uint32 type_; + + union LengthDelimited { + string* string_value_; + }; + union { uint64 varint_; uint32 fixed32_; uint64 fixed64_; - mutable union { - string* string_value_; - } length_delimited_; + mutable union LengthDelimited length_delimited_; UnknownFieldSet* group_; }; }; |