Skip to content

Fixed compilation warning in dbg mode for test_arenaAllocator

@graven please double check my fix. I noticed that you did never check the value of dealloc, so the free declaration is useless. Now it created issues with LCG108 :

../Kernel/LHCbKernel/tests/src/test_arenaAllocator.cpp:38:7: warning: 'void free(void*)' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]
   38 |   free( p );
In file included from /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.86.0-4a4ec/x86_64-el9-gcc13-dbg/include/boost/test/tree/auto_registration.hpp:21,
                 from /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.86.0-4a4ec/x86_64-el9-gcc13-dbg/include/boost/test/unit_test_suite.hpp:18,
                 from /cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.86.0-4a4ec/x86_64-el9-gcc13-dbg/include/boost/test/unit_test.hpp:19,
                 from ../Kernel/LHCbKernel/tests/src/test_arenaAllocator.cpp:13:
/cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.86.0-4a4ec/x86_64-el9-gcc13-dbg/include/boost/test/tree/test_unit.hpp: In function 'boost::unit_test::test_case* boost::unit_test::make_test_case(const boost::function<void()>&, const_string, const_string, std::size_t)':
/cvmfs/lhcb.cern.ch/lib/lcg/releases/Boost/1.86.0-4a4ec/x86_64-el9-gcc13-dbg/include/boost/test/tree/test_unit.hpp:265:103: note: returned from 'void* operator new(std::size_t)'
  265 |     return new test_case( ut_detail::normalize_test_case_name( tc_name ), tc_file, tc_line, test_func );

Merge request reports

Loading