Skip to content

Transformer.h - Adjust clang warning suppression pragmas

Suppresses warnings such as

In file included from DAQ/MDF/components/IOAlg.cpp:15:
In file included from Gaudi/InstallArea/x86_64-centos7-clang8-opt/include/GaudiAlg/Producer.h:4:
Gaudi/InstallArea/x86_64-centos7-clang8-opt/include/GaudiAlg/Transformer.h:127:23: warning: lambda capture 'ctx' is not used [-Wunused-lambda-capture]
              [this, &ctx]( auto&... ohandle ) {	
                      ^
DAQ/MDF/components/IOAlg.cpp:31:11: note: in instantiation of member function 'Gaudi::Functional::details::MultiTransformer<std::tuple<LHCb::RawEvent, std::shared_ptr<LHCb::MDF::Buffer> > (), Gaudi::Functional::Traits::BaseClass_t<FixTESPath<Gaudi::Algorithm> >, false>::execute' requested here
        : Producer( name, pSvcLocator,
          ^
1 warning generated.

Note, strictly speaking clang is correct here. The ctx content is indeed not used if the first constexpr if path is followed. Reworking things to only suppress the warning in this case got a bit messy, so this seems reasonable. Unless @graven has another idea ?

Edited by Christopher Rob Jones

Merge request reports

Loading