From 876294b700b9315dce5a9f2ca841afb8341dba99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 15 Dec 2022 10:06:44 +0100 Subject: [PATCH] MeshTools: fix an annoyingly loud & useless GCC 12 warning. --- src/Magnum/MeshTools/Test/RemoveDuplicatesTest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Magnum/MeshTools/Test/RemoveDuplicatesTest.cpp b/src/Magnum/MeshTools/Test/RemoveDuplicatesTest.cpp index 0b78430a9..7b216cd15 100644 --- a/src/Magnum/MeshTools/Test/RemoveDuplicatesTest.cpp +++ b/src/Magnum/MeshTools/Test/RemoveDuplicatesTest.cpp @@ -1237,7 +1237,9 @@ void RemoveDuplicatesTest::benchmark() { data[i].x() = i/100; std::shuffle(std::begin(data), std::end(data), std::minstd_rand{std::random_device{}()}); - std::size_t count; + /* GCC 12 LOUDLY warns that this variable might be uninitialized, which + is stupid, suppress that */ + std::size_t count = 0; UnsignedInt indices[10000]; CORRADE_BENCHMARK(1) count = MeshTools::removeDuplicatesInPlaceInto( @@ -1254,7 +1256,9 @@ void RemoveDuplicatesTest::benchmarkFuzzy() { data[i].x() = i/100; std::shuffle(std::begin(data), std::end(data), std::minstd_rand{std::random_device{}()}); - std::size_t count; + /* GCC 12 LOUDLY warns that this variable might be uninitialized, which + is stupid, suppress that */ + std::size_t count = 0; UnsignedInt indices[10000]; CORRADE_BENCHMARK(1) count = MeshTools::removeDuplicatesFuzzyInPlaceInto(