Unused parameter 'deterministic'

Bug #1643959 reported by Christopher K.
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
protobuf (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

The current version of protbuf in the Ubuntu 16.10 Repository (3.0.0-7ubuntu3) includes this bug:
https://github.com/google/protobuf/issues/2032

"Every message generates an unused parameter warning for bool deterministic in ::google::protobuf::uint8* <message>::InternalSerializeWithCachedSizesToArray( bool deterministic, ::google::protobuf::uint8* target) const. "

My project uses -Werror, and thus does not compile in current Ubuntu because of messages like this:

NSMessage.pb.cc: In member function ‘virtual google::protobuf::uint8* NS_Message::InternalSerializeWithCachedSizesToArray(bool, google::protobuf::uint8*) const’:
wifi/NSMessage.pb.cc:338:10: error: unused parameter ‘deterministic’ [-Werror=unused-parameter]
     bool deterministic, ::google::protobuf::uint8* target) const {
          ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

I would expect code being created by protobuf does not cause any warnings or errors.

This issue is fixed in protobuf's git repository with the following commit:
https://github.com/google/protobuf/commit/08b1c718e437041bfe0e6a28611621896e4fe904

Tags: artful zesty
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in protobuf (Ubuntu):
status: New → Confirmed
Revision history for this message
Kai Mast (kai-mast) wrote :

This is still a problem in artful. Can be please fix this?

gnome-shell depends on protobuf so its kind of a pain to install two different versions.

tags: added: artful zesty
Revision history for this message
Kai Mast (kai-mast) wrote :

This has been fixed upstream and all we need to do is to update the Ubuntu package.

https://bugs.launchpad.net/ubuntu/+source/protobuf/+bug/1739977

Revision history for this message
ruffsl (roxfoxpox) wrote :

Still encountering this issue with 18.04 with Version: 3.0.0-9.1ubuntu1

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in protobuf (Ubuntu):
importance: Undecided → Low
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

Could be a candidate for bionic SRU if someone was wanting to provide an example we can use as testcase to verify the fix

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.