I forgot to add that this occurs after proto buffer generates the pb.h and pb.c files. This error occurs inside the generated files when I attempt to compile them. ie the error gives the .pb.c file and line number.
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
I will post as an issue if the discussion fails to shed more light on thisIn syntax proto2, I mark each element as optional. In proto3, all elements are considered optional by default. The error seems to be from proto3 improperly checking for element existence.
I forgot to add that this occurs after proto buffer generates the pb.h and pb.c files. This error occurs inside the generated files when I attempt to compile them. ie the error gives the .pb.c file and line number.
--
--
In proto2, when a message is serialized, the serialization routine will check the has-bits to determine whether a field is set and only serialize set fields. However, in proto3, we removed has-bits, so the serialization routine can't check the has-bits. As a workaround, we instead check whether the field is set to a non-zero value. That's why proto3 has these "field == 0" comparisons but proto2 doesn't. They are there intentionally, but we may be able to write it in a way that can avoid the float-equal warnings.
Hi Seth,Could you help submit this as a github issue? https://github.com/google/protobuf/issuesDo you know how we can modify the generated code to avoid this "float-equal" warning? If you know of a solution, feel free to send us a patch to fix the code:
On Fri, Mar 4, 2016 at 4:42 PM, Seth Humphries <set...@gmail.com> wrote:
I forgot to add that this occurs after proto buffer generates the pb.h and pb.c files. This error occurs inside the generated files when I attempt to compile them. ie the error gives the .pb.c file and line number.
--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prot...@googlegroups.com.