edan wrote: > I happily upgraded to 2.3.0 - I always like to take the latest and greatest. > Unfortunately, and I think for the first time ever while upgrading > protobuf, I ran into a problem! > We compile our code with "-Werror", and this bombed out on a header file:
We build with errors on in our project too - our solution to this has been to: a) install the headers into a system locatiom, at which point gcc will not issue warnings for them. It looks like you did this in the context of your /devfs location - perhaps you need to change some system configs to completely understand that location as a chroot? b) If they aren't in a system location, include them via -isystem rather than -I, which will have the same effect. > cc1plus: warnings being treated as errors > ../../../devfs/usr/include/google/protobuf/io/coded_stream.h: In member > function "bool > google::protobuf::io::CodedInputStream::ReadLittleEndian32(google::protobuf::uint32*)": > ../../../devfs/usr/include/google/protobuf/io/coded_stream.h:776: > warning: comparison between signed and unsigned integer expressions > ../../../devfs/usr/include/google/protobuf/io/coded_stream.h: In member > function "bool > google::protobuf::io::CodedInputStream::ReadLittleEndian64(google::protobuf::uint64*)": > ../../../devfs/usr/include/google/protobuf/io/coded_stream.h:791: > warning: comparison between signed and unsigned integer expressions > > > My patch to fix this was: > > ==== > //depot/project/zenith/ports/protobuf/std/build/src/google/protobuf/io/coded_stream.h#2 > (ktext) - > //depot/project/zenith/ports/protobuf/std/build/src/google/protobuf/io/coded_stream.h#3 > (ktext) ==== content > 776c776 > < if (GOOGLE_PREDICT_TRUE(BufferSize() >= sizeof(*value))) { > --- >> if (GOOGLE_PREDICT_TRUE(BufferSize() >= > static_cast<int>(sizeof(*value)))) { > 791c791 > < if (GOOGLE_PREDICT_TRUE(BufferSize() >= sizeof(*value))) { > --- >> if (GOOGLE_PREDICT_TRUE(BufferSize() >= > static_cast<int>(sizeof(*value)))) { > > Any chance you can patch this and re-release? I'd really like to have > un-patched code in our product, but I can't use 2.3.0 without this patch.
-- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.