mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 20:21:16 -03:00
simplify oclint error suppression for scoped_lock
This commit is contained in:
@@ -749,7 +749,7 @@ env_var_t env_get_string(const wcstring &key, env_mode_flags_t mode) {
|
||||
|
||||
if (search_local || search_global) {
|
||||
/* Lock around a local region */
|
||||
scoped_lock lock(env_lock); //!OCLINT(has side effects)
|
||||
scoped_lock locker(env_lock);
|
||||
|
||||
env_node_t *env = search_local ? top : global_env;
|
||||
|
||||
@@ -918,7 +918,7 @@ static void add_key_to_string_set(const var_table_t &envs, std::set<wcstring> *s
|
||||
}
|
||||
|
||||
wcstring_list_t env_get_names(int flags) {
|
||||
scoped_lock lock(env_lock); //!OCLINT(has side effects)
|
||||
scoped_lock locker(env_lock);
|
||||
|
||||
wcstring_list_t result;
|
||||
std::set<wcstring> names;
|
||||
|
||||
Reference in New Issue
Block a user