fix: clang warnings (#21247)

This commit is contained in:
zeertzjq
2022-12-01 09:05:25 +08:00
committed by GitHub
parent 282dda643a
commit bd2d0edcbf
4 changed files with 4 additions and 2 deletions

View File

@@ -1946,7 +1946,6 @@ static void calculate_topfill_and_topline(const int fromidx, const int toidx, co
virtual_lines_passed -= from_topfill;
// count the same amount of virtual lines in the toidx buffer
curdif = thistopdiff;
int curlinenum_to = thistopdiff->df_lnum[toidx];
int linesfiller = 0;
count_filler_lines_and_topline(&curlinenum_to, &linesfiller,
@@ -2628,7 +2627,7 @@ bool diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp)
break;
}
}
if (dp->is_linematched) {
if (dp != NULL && dp->is_linematched) {
while (dp && dp->df_next
&& lnum == dp->df_count[idx] + dp->df_lnum[idx]
&& dp->df_next->df_lnum[idx] == lnum) {