mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 13:31:02 +08:00
t/test-full.proto: add 'allow_alias' option to TestEnumDupValues
protobuf 2.5.0 started warning that we would need to enable the 'allow_alias' option on this enum due to the duplicate enum values, and protobuf 2.6.0 turned this into an error. Turn this option on, now that protobuf 2.5.0 is more common (e.g., it's now in Ubuntu 14.04 LTS). This will break with older protobuf versions, so we now require >= 2.5.0. We should now see diagnostics like these disappear from the build log: [libprotobuf ERROR google/protobuf/descriptor.cc:4153] "foo.VALUE_B" uses the same enum value as "foo.VALUE_A". If this is intended, set 'option allow_alias = true;' to the enum definition. Based on a patch from Ilya Lipnitskiy.
This commit is contained in:
parent
f25a0f4e58
commit
c4a0e69337
@ -45,6 +45,7 @@ enum TestEnumDupValues {
|
||||
VALUE_F = 1000;
|
||||
VALUE_AA = 1000;
|
||||
VALUE_BB = 1001;
|
||||
option allow_alias = true;
|
||||
}
|
||||
|
||||
message TestFieldNo15 { // should use 1 byte header
|
||||
|
Loading…
x
Reference in New Issue
Block a user