Skip to content

TrigAFPHypo, TrigEgammaHypo, TrigTauHypo, DecisionHandling, fix...

TrigAFPHypo, TrigEgammaHypo, TrigTauHypo, DecisionHandling, fix [-Wstring-plus-int] and [-Wrange-loop-construct] clang warnings

example :

build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigHypothesis/TrigAFPHypo/src/TrigAFPDijetComboHypoTool.cxx:94:18: warning: loop variable 'comb' of type 'const std::pair<unsigned int, ElementLink<DataVector<xAOD::TrigComposite_v1, DataModel_detail::NoBase> > >' creates a copy from type 'const std::pair<unsigned int, ElementLink<DataVector<xAOD::TrigComposite_v1, DataModel_detail::NoBase> > >' [-Wrange-loop-construct]
  for(const auto comb: combination){
                 ^
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigHypothesis/TrigAFPHypo/src/TrigAFPDijetComboHypoTool.cxx:94:7: note: use reference type 'const std::pair<unsigned int, ElementLink<DataVector<xAOD::TrigComposite_v1, DataModel_detail::NoBase> > > &' to prevent copying
  for(const auto comb: combination){
      ^~~~~~~~~~~~~~~~
                 &
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigHypothesis/TrigAFPHypo/src/TrigAFPDijetComboHypoTool.cxx:104:89: warning: adding 'std::vector::size_type' (aka 'unsigned long') to a string does not append to the string [-Wstring-plus-int]
    throw std::runtime_error("Expecting to combine exactly two jets, but instead found "+selected_jets.size());
                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigHypothesis/TrigAFPHypo/src/TrigAFPDijetComboHypoTool.cxx:104:89: note: use array indexing to silence this warning
    throw std::runtime_error("Expecting to combine exactly two jets, but instead found "+selected_jets.size());
                                                                                        ^
                             &                                                          [                    ]
# CMake ---> /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/x86_64/Clang/10.0.1-x86_64-centos7-gcc8-opt/10.0.1/x86_64-centos7-gcc8-opt/bin/clang++ -DATLAS_GAUDI_V21 -DATLAS_PACKAGE_NAME="TrigAFPHypo" -DBOOST_ALL_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_REGEX_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DCLHEP_ABS_DEFINED -DCLHEP_MAX_MIN_DEFINED -DCLHEP_SQR_DEFINED -DFMT_LOCALE -DFMT_SHARED -DGAUDI_V20_COMPAT -DHAVE_GAUDI_PLUGINSVC -DJSON_USE_IMPLICIT_CONVERSIONS=1 -DTrigAFPHypo_EXPORTS -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigHypothesis/TrigAFPHypo -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthenaBaseComps -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthenaKernel -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/CxxUtils -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/DataModelRoot -I/cvmfs/sft.cern.ch/lcg/releases/Boost/1.75.0-e9c3f/x86_64-centos7-gcc8-opt/include -I/cvmfs/sft.cern.ch/lcg/releases/LCG_100_ATLAS_5/fmt/7.1.3/x86_64-centos7-gcc8-opt/include -I/cvmfs/sft.cern.ch/lcg/releases/LCG_100_ATLAS_5/jsonmcpp/3.9.1/x86_64-centos7-gcc8-opt/include -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODEventInfo -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthContainers -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthContainersInterfaces -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthLinks -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/SGTools -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODCore -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/RootUtils -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/StoreGate -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthAllocators -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Database/PersistentDataModel -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthenaMonitoringKernel -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/DecisionHandling -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigSteer/TrigCompositeUtils -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigConfiguration/TrigConfHLTUtils -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthToolSupport/AsgMessaging -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthToolSupport/AsgDataHandles -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/AthToolSupport/AsgTools -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigDecisionInterface -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODBase -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigger -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigNavStructure -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigT1/TrigT1MuctpiBits -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigConfiguration/TrigConfHLTData -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigConfiguration/TrigConfL1Data -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigConfiguration/TrigConfData -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigMonitoring/TrigCostMonitor -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigAnalysis/TrigDecisionTool -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/EventInfo -I/build/atnight/localbuilds/nightlies/Athena/master/athena/PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Control/Navigation -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/EventKernel -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/VxVertex -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/GeoPrimitives -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/EventPrimitives -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkEventPrimitives -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkNeutralParameters -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkDetDescr/TrkSurfaces -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/Identifier -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkParametersBase -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkDetDescr/TrkDetDescrUtils -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkDetDescr/TrkDetElementBase -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkTrackLink -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkParameters -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/FourMom -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigDecisionEvent -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigSteeringEvent -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/RoiDescriptor -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/IRegionSelector -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigMuonEvent -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Reconstruction/Particle -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkParticleBase -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkTrack -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkMaterialOnTrack -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkMeasurementBase -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkTrackSummary -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigInDetEvent -I/build/atnight/localbuilds/nightlies/Athena/master/athena/InnerDetector/InDetRecEvent/InDetPrepRawData -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/EventContainers -I/build/atnight/localbuilds/nightlies/Athena/master/athena/InnerDetector/InDetDetDescr/InDetReadoutGeometry -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/AtlasDetDescr -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/IdDict -I/build/atnight/localbuilds/nightlies/Athena/master/athena/InnerDetector/InDetDetDescr/InDetIdentifier -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/ReadoutGeometryBase -I/build/atnight/localbuilds/nightlies/Athena/master/athena/InnerDetector/InDetConditions/InDetCondTools -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/DetDescrCond/DetDescrConditions -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Database/AthenaPOOL/AthenaPoolUtilities -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Database/APR/CollectionBase -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Database/APR/FileCatalog -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Database/APR/POOLCore -I/build/atnight/localbuilds/nightlies/Athena/master/athena/InnerDetector/InDetDetDescr/InDetGeoModelUtils -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Database/RDBAccessSvc -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Database/DBLock -I/build/atnight/localbuilds/nightlies/Athena/master/athena/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkPrepRawData -I/build/atnight/localbuilds/nightlies/Athena/master/athena/InnerDetector/InDetRawEvent/InDetRawData -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigDataAccess/TrigSerializeCnvSvc -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkSegment -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tracking/TrkEvent/TrkSpacePoint -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigStorageDefinitions -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODBTagging -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTracking -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODJet -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODPFlow -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODCaloEvent -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Calorimeter/CaloGeoHelpers -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Calorimeter/CaloEvent -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Calorimeter/CaloConditions -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Calorimeter/CaloIdentifier -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Calorimeter/CaloCondBlobObjs -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/NavFourMom -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Calorimeter/CaloDetDescr -I/build/atnight/localbuilds/nightlies/Athena/master/athena/DetectorDescription/GeoModel/GeoModelInterfaces -I/build/atnight/localbuilds/nightlies/Athena/master/athena/LArCalorimeter/LArGeoModel/LArReadoutGeometry -I/build/atnight/localbuilds/nightlies/Athena/master/athena/LArCalorimeter/LArGeoModel/LArHV -I/build/atnight/localbuilds/nightlies/Athena/master/athena/LArCalorimeter/LArRawConditions -I/build/atnight/localbuilds/nightlies/Athena/master/athena/LArCalorimeter/LArIdentifier -I/build/atnight/localbuilds/nightlies/Athena/master/athena/LArCalorimeter/LArElecCalib -I/build/atnight/localbuilds/nightlies/Athena/master/athena/LArCalorimeter/LArCabling -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODEgamma -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODPrimitives -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTruth -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODHIEvent -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODMuon -I/build/atnight/localbuilds/nightlies/Athena/master/athena/MuonSpectrometer/MuonStationIndex -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTau -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigBphys -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigCalo -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigEgamma -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigL1Calo -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigMinBias -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigMissingET -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigMuon -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODTrigRinger -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigNavigation -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigEvent/TrigRoiConversion -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigConfiguration/TrigConfInterfaces -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigDataAccess/TrigDataAccessMonitoring -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigTools/TrigTimeAlgs -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Tools/PathResolver -I/build/atnight/localbuilds/nightlies/Athena/master/athena/Event/xAOD/xAODForward -isystem /cvmfs/sft.cern.ch/lcg/releases/LCG_100_ATLAS_5/Boost/1.75.0/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/sft.cern.ch/lcg/releases/LCG_100_ATLAS_5/ROOT/v6.24.00/x86_64-centos7-gcc8-opt/include -isystem /build/atnight/localbuilds/nightlies/Athena/master/build/install/AthenaExternals/22.0.39/InstallArea/x86_64-centos7-clang10-opt/include -isystem /cvmfs/sft.cern.ch/lcg/releases/LCG_100_ATLAS_5/tbb/2020_U2/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/sft.cern.ch/lcg/releases/LCG_100_ATLAS_5/cppgsl/3.1.0/x86_64-centos7-gcc8-opt/include -isystem /cvmfs/sft.cern.ch/lcg/releases/LCG_100_ATLAS_5/CORAL/3_3_8/x86_64-centos7-gcc8-opt/include -isystem /build/atnight/localbuilds/nightlies/Athena/master/build/install/AthenaExternals/22.0.39/InstallArea/x86_64-centos7-clang10-opt/lib/CLHEP-2.4.1.3/../../include -isystem /cvmfs/sft.cern.ch/lcg/releases/LCG_100_ATLAS_5/eigen/3.3.7/x86_64-centos7-gcc8-opt/include/eigen3 -isystem /cvmfs/atlas.cern.ch/repo/sw/tdaq/tdaq-common/tdaq-common-04-03-00/installed/include -ffp-exception-behavior=maytrap -DNDEBUG -O2 -g -Wall -Wno-long-long -Wno-deprecated -Wno-unused-local-typedefs -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -Wextra -Werror=return-type -pedantic -fPIC -pthread -std=c++17 -MD -MT Trigger/TrigHypothesis/TrigAFPHypo/CMakeFiles/TrigAFPHypo.dir/src/components/AFPJetHypo_entries.cxx.o -MF CMakeFiles/TrigAFPHypo.dir/src/components/AFPJetHypo_entries.cxx.o.d -o CMakeFiles/TrigAFPHypo.dir/src/components/AFPJetHypo_entries.cxx.o -c /build/atnight/localbuilds/nightlies/Athena/master/athena/Trigger/TrigHypothesis/TrigAFPHypo/src/components/AFPJetHypo_entries.cxx
2 warnings generated.

Mentioning @tamartin , @ssnyder

Edited by Christos Anastopoulos

Merge request reports

Loading