thread/sema: name the lock temporary to silence a warning
This commit is contained in:
parent
5721602ef7
commit
facba4e799
@ -11,8 +11,10 @@
|
|||||||
void
|
void
|
||||||
fight (cruft::thread::semaphore &sem, const int iterations)
|
fight (cruft::thread::semaphore &sem, const int iterations)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < iterations; ++i)
|
for (int i = 0; i < iterations; ++i) {
|
||||||
std::lock_guard {sem};
|
std::lock_guard tmp {sem};
|
||||||
|
(void)tmp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user