blueprint-freespeech / ricochet-refresh

Anonymous peer-to-peer instant messaging
https://www.ricochetrefresh.net
Other
164 stars 27 forks source link

Linux builds are complaining of "warning: unused parameter ‘deterministic’ " #15

Open PeterTonoli opened 5 years ago

PeterTonoli commented 5 years ago

/tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc: In member function ‘virtual google::protobuf::uint8 Protocol::Data::Control::Packet::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8) const’: /tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc:495:10: warning: unused parameter ‘deterministic’ [-Wunused-parameter] bool deterministic, ::google::protobuf::uint8 target) const { ^~~~~ /tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc: In member function ‘virtual google::protobuf::uint8 Protocol::Data::Control::OpenChannel::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8) const’: /tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc:1099:10: warning: unused parameter ‘deterministic’ [-Wunused-parameter] bool deterministic, ::google::protobuf::uint8 target) const { ^~~~~ /tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc: In member function ‘virtual bool Protocol::Data::Control::OpenChannel::IsInitialized() const’: /tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc:1235:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] if (!extensions.IsInitialized()) return false; return true; ^~ /tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc:1235:53: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ if (!extensions.IsInitialized()) return false; return true; ^~ e.g. /tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc: In member function ‘virtual google::protobuf::uint8 Protocol::Data::Control::ChannelResult::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8) const’: /tmp/ricochet-refresh/src/protocol/ControlChannel.pb.cc:1584:10: warning: unused parameter ‘deterministic’ [-Wunused-parameter] bool deterministic, ::google::protobuf::uint8* target) const { ^~~~~

morganava commented 3 years ago

We should make an effort to compile with as many warnings as possible (and fix them). This may be fixed in newer version of protobuf lib.

m-simonelli commented 2 years ago

@pospeselr I'm suggesting we close this issue, for two reasons 1) Our build is now always done in ricochet-build, and we have wildly different sets of warnings that get spewed out due to the protobuf generated files. 2) While we can make an effort to compile these separately in our CMake project and suppress certain warnings specifically for these files, it's not really something we have to deal with. Protobuf works, and the warnings generated are generally ones that are rather pedantic.

NB: That said, I know that one issue we can deal with is the use of ...::ByteSize(), since it's now deprecated in favour of ...::ByteSizeLong()