mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-26 19:11:12 -03:00
Remove fish_mutex_t wrapper around std::mutex
@ridiculousfish had introduced this in 3a45cad12e
to work around an issue with Coverity Scan where it couldn't tell the
mutex was correctly locked, but even with the `fish_mutex_t` hack, it
still emits the same warnings, so there's no pointing in keeping it.
This commit is contained in:
@@ -1253,9 +1253,7 @@ bool completer_t::try_complete_user(const wcstring &str) {
|
||||
bool result = false;
|
||||
size_t name_len = str.length() - 1;
|
||||
|
||||
// We don't bother with the thread-safe `getpwent_r()` variant because this is the sole place
|
||||
// where we call getpwent().
|
||||
static fish_mutex_t lock;
|
||||
static std::mutex lock;
|
||||
scoped_lock locker(lock);
|
||||
setpwent();
|
||||
// cppcheck-suppress getpwentCalled
|
||||
|
||||
Reference in New Issue
Block a user