diff options
author | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-05 21:44:19 +0100 |
---|---|---|
committer | Eliseo Martínez <eliseomarmol@gmail.com> | 2014-11-06 09:51:58 +0100 |
commit | 0bda79a847112702adc07eea03105da26fdef89f (patch) | |
tree | 9214f61027ab9a1fe964706bc75ed41c80807ee9 /src | |
parent | 997c0b3939f6da8c32672bb4e640ebc86b167be0 (diff) | |
download | rneovim-0bda79a847112702adc07eea03105da26fdef89f.tar.gz rneovim-0bda79a847112702adc07eea03105da26fdef89f.tar.bz2 rneovim-0bda79a847112702adc07eea03105da26fdef89f.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/edit.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 1d5e1a51cf..31683c1a10 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -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) ; |