aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-25 15:20:54 +0800
committerGitHub <noreply@github.com>2022-08-25 15:20:54 +0800
commitf0658fd552ec2d72cdd3f09942fe104bc6265115 (patch)
treee97a3a2c1efedce766ab68fbf901c4003811c64d /src/nvim/eval
parent5c9baa6f35262f75b73a82e4b2eba8f7cdf9db0a (diff)
downloadrneovim-f0658fd552ec2d72cdd3f09942fe104bc6265115.tar.gz
rneovim-f0658fd552ec2d72cdd3f09942fe104bc6265115.tar.bz2
rneovim-f0658fd552ec2d72cdd3f09942fe104bc6265115.zip
refactor: suppress clang and PVS warnings (#19940)
Diffstat (limited to 'src/nvim/eval')
-rw-r--r--src/nvim/eval/typval.c2
-rw-r--r--src/nvim/eval/vars.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index dcfdb4ab8e..152c2eff8f 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -1252,7 +1252,7 @@ static void do_sort_uniq(typval_T *argvars, typval_T *rettv, bool sort)
idx++;
li = TV_LIST_ITEM_NEXT(l, li);
}
- if (info.item_compare_func_err) {
+ if (info.item_compare_func_err) { // -V547
emsg(_("E882: Uniq compare function failed"));
break;
}
diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c
index 03ffd42549..d1336b4e28 100644
--- a/src/nvim/eval/vars.c
+++ b/src/nvim/eval/vars.c
@@ -791,6 +791,7 @@ static void ex_unletlock(exarg_T *eap, char *argstart, int deep, ex_unletlock_ca
semsg(_(e_invarg2), arg - 1);
return;
}
+ assert(*lv.ll_name == '$'); // suppress clang "Uninitialized argument value"
if (!error && !eap->skip && callback(&lv, arg, eap, deep) == FAIL) {
error = true;
}