simplify oclint error suppression for scoped_lock

This commit is contained in:
Kurtis Rader
2016-07-20 22:30:58 -07:00
parent b53f42970c
commit 1d2fff9686
12 changed files with 71 additions and 61 deletions

View File

@@ -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;