ARM-software / ATP-Engine

BSD 3-Clause Clear License
20 stars 17 forks source link

Fails to build #9

Open rossburton opened 2 years ago

rossburton commented 2 years ago

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 commented 2 years ago

This is most likely due to protobuf upgrading to 3.19.1.

matteoandreozzi commented 2 years ago

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.