mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix warnings: edit.c: ins_compl_next_buf(): Np dereference: FP.
Problem : Dereference of null pointer @ 3234. Diagnostic : False positive. Rationale : `wp` is local static, so maintains value between calls. First time function is called for a given flag will have `buf == curbuf`, implying `wp` initialization. Resolution : Assert variable always having been initialized.
This commit is contained in:
parent
997c0b3939
commit
0bda79a847
@ -3231,6 +3231,7 @@ static buf_T *ins_compl_next_buf(buf_T *buf, int flag)
|
||||
if (flag == 'w') { /* just windows */
|
||||
if (buf == curbuf) /* first call for this flag/expansion */
|
||||
wp = curwin;
|
||||
assert(wp);
|
||||
while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
|
||||
&& wp->w_buffer->b_scanned)
|
||||
;
|
||||
|
Loading…
Reference in New Issue
Block a user