ATP-Engine icon indicating copy to clipboard operation
ATP-Engine copied to clipboard

Fails to build

Open rossburton opened this issue 4 years ago • 2 comments

I suggest not using -Werror, as changes to the compiler can cause new warnings, which are then new errors:

test_atp.cc: In member function ‘void TrafficProfiles::TestAtp::testAtp_trafficProfile()’:
test_atp.cc:535:27: error: ignoring return value of ‘TrafficProfiles::PatternConfiguration* TrafficProfiles::Profile::release_pattern()’, declared with attribute nodiscard [-Werror=unused-result]
     config.release_pattern();
     ~~~~~~~~~~~~~~~~~~~~~~^~
In file included from packet_desc.hh:14,
                 from traffic_profile_manager.hh:25,
                 from test_atp.hh:32,
                 from test_atp.cc:11:
proto/tp_config.pb.h:6735:49: note: declared here
 inline ::TrafficProfiles::PatternConfiguration* Profile::release_pattern() {
                                                 ^~~~~~~

rossburton avatar Nov 08 '21 14:11 rossburton

This is most likely due to protobuf upgrading to 3.19.1.

rossburton avatar Nov 08 '21 17:11 rossburton

Hi Ross, thanks for reporting this. From the looks of it, seems like the release function has been augmented with a return value in recent versions of Protobuf. We'll look into it and work on a fix. For now, as you observe, manually disabling the Werror flag in the engine Makefile should do the trick.

matteoandreozzi avatar Nov 08 '21 22:11 matteoandreozzi