diff --git a/test/thread/semaphore.cpp b/test/thread/semaphore.cpp index 24fee205..65fddb87 100644 --- a/test/thread/semaphore.cpp +++ b/test/thread/semaphore.cpp @@ -11,8 +11,10 @@ void fight (cruft::thread::semaphore &sem, const int iterations) { - for (int i = 0; i < iterations; ++i) - std::lock_guard {sem}; + for (int i = 0; i < iterations; ++i) { + std::lock_guard tmp {sem}; + (void)tmp; + } }