Skip to content

Fix fake build errors with Gaudi v30r3

Gloria Corti requested to merge fake-errors into master

Fix fake build errors reported for Gauss in https://lhcb-nightlies.cern.ch/logs/build/nightly/lhcb-gauss-dev/1740/x86_64-slc6-gcc7-opt/Gauss/,

From @cattanem: They are false positives and are trivial to fix. e.g.:

Sim/GaussMonitor/src/CheckLifeTime.cpp:113:60: warning: ignoring return value of 'StatusCode GaudiCommon<PBASE>::Error(const string&, StatusCode, size_t) const [with PBASE = Algorithm; std::__cxx11::string = std::__cxx11::basic_string<char>; size_t = long unsigned int]', declared with attribute nodiscard [-Wunused-result]
     if ( 0 == pp ) { Error ( "Invalid particle: " + (*ip)) ; continue ; }

Change the above line to

     if ( 0 == pp ) { Error ( "Invalid particle: " + (*ip)).ignore() ; continue ; }

Similarly you could get rid of a lot of warnings:

Sim/GaussMonitor/src/CheckLifeTime.cpp:115:60: warning: ignoring return value of 'StatusCode GaudiCommon<PBASE>::Warning(const string&, StatusCode, size_t) const [with PBASE = Algorithm; std::__cxx11::string = std::__cxx11::basic_string<char>; size_t = long unsigned int]', declared with attribute nodiscard [-Wunused-result]
     { Warning ( "No '" + (*ip) + "' Particles are found!") ; continue ; }

Change it to

     { Warning ( "No '" + (*ip) + "' Particles are found!”).ignore() ; continue ; }

This MR addresses the Errors and the Warnings in the same package where the Errors were present, i.e. GaussAlgs, GaussMonitor, GaussRICH and GaussCherenkov

cc: @kreps

Merge request reports

Loading