]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Fix nodiscard warnings in perf test for memory pools
authorJonathan Wakely <jwakely@redhat.com>
Wed, 13 Nov 2024 12:57:11 +0000 (12:57 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 13 Nov 2024 17:58:49 +0000 (17:58 +0000)
commit42def7cd8bab71002d3097b9db33fd1dc25a72f6
tree1058912a7af31d0620f94a173e14f9202532a9b5
parent2d7d8179cbccaddb308c966b9c1d4840c0d56b03
libstdc++: Fix nodiscard warnings in perf test for memory pools

The use of unnamed std::lock_guard temporaries was intentional here, as
they were used like barriers (but std::barrier isn't available until
C++20). But that gives nodiscard warnings, because unnamed temporary
locks are usually unintentional. Use named variables in new block scopes
instead.

libstdc++-v3/ChangeLog:

* testsuite/performance/20_util/memory_resource/pools.cc: Fix
-Wunused-value warnings about unnamed std::lock_guard objects.
libstdc++-v3/testsuite/performance/20_util/memory_resource/pools.cc