aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-01 09:05:25 +0800
committerGitHub <noreply@github.com>2022-12-01 09:05:25 +0800
commitbd2d0edcbf4e98e05edff13f344865fcafac56b5 (patch)
tree13253884d9c197f8355227b8e248d5d3750bd73d /src/nvim/diff.c
parent282dda643ae598d5c8e9f34c379d931563b4891b (diff)
downloadrneovim-bd2d0edcbf4e98e05edff13f344865fcafac56b5.tar.gz
rneovim-bd2d0edcbf4e98e05edff13f344865fcafac56b5.tar.bz2
rneovim-bd2d0edcbf4e98e05edff13f344865fcafac56b5.zip
fix: clang warnings (#21247)
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index 64a142fa0e..ac637c2c70 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -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) {