Severity: warning
Line: 20
Summary: CWE: 667
The lock is ineffective because the mutex is locked at the same scope as the mutex itself.
It looks like Cppcheck believes shared_foo_lock and shared_bar_lock are mutexes rather than (deferred) locks. shared_foo_lock and shared_bar_lock reference mutexes outside the same scope of the scoped_lock.
Last edit: Pixel 2021-08-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Severity: warning
Line: 20
Summary: CWE: 667
The lock is ineffective because the mutex is locked at the same scope as the mutex itself.
It looks like Cppcheck believes shared_foo_lock and shared_bar_lock are mutexes rather than (deferred) locks. shared_foo_lock and shared_bar_lock reference mutexes outside the same scope of the scoped_lock.
Last edit: Pixel 2021-08-18