Mercurial > vim
comparison src/edit.c @ 16054:78faa25f9698 v8.1.1032
patch 8.1.1032: warnings from clang static analyzer
commit https://github.com/vim/vim/commit/2c519cf3bfe76083767ac94c674d2e161ed36587
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 21 21:45:34 2019 +0100
patch 8.1.1032: warnings from clang static analyzer
Problem: Warnings from clang static analyzer. (Yegappan Lakshmanan)
Solution: Fix relevant warnings.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 Mar 2019 22:00:05 +0100 |
parents | 7fad90423bd2 |
children | 5c5d211bd5a8 |
comparison
equal
deleted
inserted
replaced
16053:b6ce2c4d15a8 | 16054:78faa25f9698 |
---|---|
4107 * Returns the buffer to scan, if any, otherwise returns curbuf -- Acevedo | 4107 * Returns the buffer to scan, if any, otherwise returns curbuf -- Acevedo |
4108 */ | 4108 */ |
4109 static buf_T * | 4109 static buf_T * |
4110 ins_compl_next_buf(buf_T *buf, int flag) | 4110 ins_compl_next_buf(buf_T *buf, int flag) |
4111 { | 4111 { |
4112 static win_T *wp; | 4112 static win_T *wp = NULL; |
4113 | 4113 |
4114 if (flag == 'w') /* just windows */ | 4114 if (flag == 'w') // just windows |
4115 { | 4115 { |
4116 if (buf == curbuf) /* first call for this flag/expansion */ | 4116 if (buf == curbuf || wp == NULL) // first call for this flag/expansion |
4117 wp = curwin; | 4117 wp = curwin; |
4118 while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin | 4118 while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin |
4119 && wp->w_buffer->b_scanned) | 4119 && wp->w_buffer->b_scanned) |
4120 ; | 4120 ; |
4121 buf = wp->w_buffer; | 4121 buf = wp->w_buffer; |