vim-patch:8.1.1032: warnings from clang static analyzer

Problem:    Warnings from clang static analyzer. (Yegappan Lakshmanan)
Solution:   Fix relevant warnings.
2c519cf3bf
This commit is contained in:
Jan Edmund Lazo
2020-12-28 16:35:20 -05:00
parent 0e913a0812
commit 26dfeb42dd
6 changed files with 7 additions and 11 deletions

View File

@@ -3810,10 +3810,10 @@ static void ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
*/
static buf_T *ins_compl_next_buf(buf_T *buf, int flag)
{
static win_T *wp;
static win_T *wp = NULL;
if (flag == 'w') { // just windows
if (buf == curbuf) { // first call for this flag/expansion
if (buf == curbuf || wp == NULL) { // first call for this flag/expansion
wp = curwin;
}
assert(wp);