Merge pull request #20821 from dundargoc/refactor/clang-tidy

refactor: fix clang-tidy warnings
This commit is contained in:
bfredl
2022-11-08 09:48:48 +01:00
committed by GitHub
56 changed files with 558 additions and 555 deletions

View File

@@ -2153,12 +2153,11 @@ static char *qf_push_dir(char *dirbuf, struct dir_stack_T **stackptr, bool is_fi
if ((*stackptr)->dirname != NULL) {
return (*stackptr)->dirname;
} else {
ds_ptr = *stackptr;
*stackptr = (*stackptr)->next;
xfree(ds_ptr);
return NULL;
}
ds_ptr = *stackptr;
*stackptr = (*stackptr)->next;
xfree(ds_ptr);
return NULL;
}
// pop dirbuf from the directory stack and return previous directory or NULL if
@@ -2706,11 +2705,10 @@ static int qf_jump_edit_buffer(qf_info_T *qi, qfline_T *qf_ptr, int forceit, int
if (!can_abandon(curbuf, forceit)) {
no_write_message();
return FAIL;
} else {
retval = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1,
ECMD_HIDE + ECMD_SET_HELP,
prev_winid == curwin->handle ? curwin : NULL);
}
retval = do_ecmd(qf_ptr->qf_fnum, NULL, NULL, NULL, (linenr_T)1,
ECMD_HIDE + ECMD_SET_HELP,
prev_winid == curwin->handle ? curwin : NULL);
} else {
retval = buflist_getfile(qf_ptr->qf_fnum, (linenr_T)1,
GETF_SETMARK | GETF_SWITCH, forceit);
@@ -5140,11 +5138,10 @@ static bool vgr_qflist_valid(win_T *wp, qf_info_T *qi, unsigned qfid, char *titl
// An autocmd has freed the location list
emsg(_(e_current_location_list_was_changed));
return false;
} else {
// Quickfix list is not found, create a new one.
qf_new_list(qi, title);
return true;
}
// Quickfix list is not found, create a new one.
qf_new_list(qi, title);
return true;
}
if (qf_restore_list(qi, qfid) == FAIL) {
return false;