thread/sema: name the lock temporary to silence a warning
This commit is contained in:
parent
5721602ef7
commit
facba4e799
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user