diff options
Diffstat (limited to 'src/nvim/quickfix.c')
-rw-r--r-- | src/nvim/quickfix.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index ff51bf289e..bd5dfa92cc 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -191,7 +191,7 @@ typedef struct { // Looking up a buffer can be slow if there are many. Remember the last one // to make this a lot faster if there are multiple matches in the same file. static char_u *qf_last_bufname = NULL; -static bufref_T qf_last_bufref = { NULL, 0 }; +static bufref_T qf_last_bufref = { NULL, 0, 0 }; /* * Read the errorfile "efile" into memory, line by line, building the error @@ -2330,9 +2330,7 @@ void qf_history(exarg_T *eap) } } -/* - * Free error list "idx". - */ +/// Free all the entries in the error list "idx". static void qf_free(qf_info_T *qi, int idx) { qfline_T *qfp; @@ -4027,7 +4025,7 @@ int get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict) if ((di = tv_dict_find(what, S_LEN("nr"))) != NULL) { // Use the specified quickfix/location list if (di->di_tv.v_type == VAR_NUMBER) { - qf_idx = di->di_tv.vval.v_number - 1; + qf_idx = (int)di->di_tv.vval.v_number - 1; if (qf_idx < 0 || qf_idx >= qi->qf_listcount) { return FAIL; } @@ -4101,7 +4099,7 @@ static int qf_add_entries(qf_info_T *qi, list_T *list, char_u *title, char *const filename = tv_dict_get_string(d, "filename", true); int bufnum = (int)tv_dict_get_number(d, "bufnr"); - long lnum = tv_dict_get_number(d, "lnum"); + long lnum = (long)tv_dict_get_number(d, "lnum"); int col = (int)tv_dict_get_number(d, "col"); char_u vcol = (char_u)tv_dict_get_number(d, "vcol"); int nr = (int)tv_dict_get_number(d, "nr"); @@ -4183,7 +4181,7 @@ static int qf_set_properties(qf_info_T *qi, dict_T *what, int action) if ((di = tv_dict_find(what, S_LEN("nr"))) != NULL) { // Use the specified quickfix/location list if (di->di_tv.v_type == VAR_NUMBER) { - qf_idx = di->di_tv.vval.v_number - 1; + qf_idx = (int)di->di_tv.vval.v_number - 1; if (qf_idx < 0 || qf_idx >= qi->qf_listcount) { return FAIL; } |