From c8f1f37eadf13f3497a10bc91a076a63e8540bac Mon Sep 17 00:00:00 2001 From: scott snyder Date: Mon, 29 Aug 2022 16:43:41 +0200 Subject: [PATCH] AthenaKernel: Fix gcc12 warning. Work around gcc12 false positive use-after-free warning. --- Control/AthenaKernel/src/DsoDb.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Control/AthenaKernel/src/DsoDb.cxx b/Control/AthenaKernel/src/DsoDb.cxx index cae942230a4..d1eff96b420 100644 --- a/Control/AthenaKernel/src/DsoDb.cxx +++ b/Control/AthenaKernel/src/DsoDb.cxx @@ -328,10 +328,8 @@ DsoDb::build_repository() if (!boost::filesystem::exists(*itr)) { continue; } - Paths_t dir_content; - std::copy(fs::directory_iterator(p), - fs::directory_iterator(), - std::back_inserter(dir_content)); + Paths_t dir_content {fs::directory_iterator(p), + fs::directory_iterator()}; std::sort(dir_content.begin(), dir_content.end()); for (Paths_t::iterator ipath = dir_content.begin(), -- GitLab