From b445db5b92ab2da3de5296e293d62b2680a52119 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Sat, 27 Jun 2026 11:21:53 +0200 Subject: [PATCH] Fix spurious GCC-15 warning --- .../TPC/reconstruction/test/testTPCSyncPatternMonitor.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Detectors/TPC/reconstruction/test/testTPCSyncPatternMonitor.cxx b/Detectors/TPC/reconstruction/test/testTPCSyncPatternMonitor.cxx index b1651d4f5f6e1..cc4c6360656ac 100644 --- a/Detectors/TPC/reconstruction/test/testTPCSyncPatternMonitor.cxx +++ b/Detectors/TPC/reconstruction/test/testTPCSyncPatternMonitor.cxx @@ -62,7 +62,10 @@ BOOST_AUTO_TEST_CASE(SyncPatternMonitor_test2) for (int pos = 0; pos < 4; ++pos) { mon.reset(); std::vector test1_vec(4 + 4 + 2 + pos, mon.getPatternB()); +#pragma GCC diagnostic push // TODO: Remove once this is fixed in GCC +#pragma GCC diagnostic ignored "-Wstringop-overflow" // TODO: Remove once this is fixed in GCC test1_vec.insert(test1_vec.begin() + 4 + 2 + pos, SYNC_PATTERN.begin(), SYNC_PATTERN.end()); +#pragma GCC diagnostic pop // TODO: Remove once this is fixed in GCC result res{pos, 4 + 32 + pos}; for (int i = 0; i < test1_vec.size() - 4; i += 4) { @@ -95,7 +98,10 @@ BOOST_AUTO_TEST_CASE(SyncPatternMonitor_test3) // loop over 4 possible positions for (int pos = 0; pos < 4; ++pos) { std::vector test1_vec(4 + 4 + 2 + pos, mon.getPatternB()); +#pragma GCC diagnostic push // TODO: Remove once this is fixed in GCC +#pragma GCC diagnostic ignored "-Wstringop-overflow" // TODO: Remove once this is fixed in GCC test1_vec.insert(test1_vec.begin() + 4 + 2 + pos, SYNC_PATTERN.begin(), SYNC_PATTERN.end()); +#pragma GCC diagnostic pop // TODO: Remove once this is fixed in GCC result res{pos, 4 + 32 + pos}; // loop over all positions of sync pattern in vector and replace with different pattern