mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
refactor: suppress clang and PVS warnings (#19940)
This commit is contained in:
@@ -8148,6 +8148,7 @@ repeat:
|
||||
// Only replace it when it starts with '~'
|
||||
if (*dirname == '~') {
|
||||
s = xstrdup(dirname);
|
||||
assert(s != NULL); // suppress clang "Argument with 'nonnull' attribute passed null"
|
||||
*fnamep = s;
|
||||
xfree(*bufp);
|
||||
*bufp = s;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -640,6 +640,7 @@ static char_u *ins_compl_infercase_gettext(char_u *str, int char_len, int compl_
|
||||
while (i < char_len) {
|
||||
if (gap.ga_data != NULL) {
|
||||
ga_grow(&gap, 10);
|
||||
assert(gap.ga_data != NULL); // suppress clang "Dereference of NULL pointer"
|
||||
p = (char *)gap.ga_data + gap.ga_len;
|
||||
gap.ga_len += utf_char2bytes(wca[i++], p);
|
||||
} else if ((p - (char *)IObuff) + 6 >= IOSIZE) {
|
||||
|
Reference in New Issue
Block a user