patch 9.1.0177: Coverity reports dead code
Problem: Coverity reports dead code.
Solution: Remove the dead code. Also fix a mistake in ml_get_pos_len()
and update some comments (zeertzjq).
closes: #14189
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/quickfix.c b/src/quickfix.c
index 006c134..0bf4cfe 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -6203,7 +6203,7 @@
else
{
char_u *str = ml_get_buf(buf, lnum, FALSE);
- int line_len = ml_get_buf_len(buf, lnum);
+ colnr_T linelen = ml_get_buf_len(buf, lnum);
int score;
int_u matches[MAX_FUZZY_MATCHES];
int_u sz = ARRAY_LENGTH(matches);
@@ -6242,7 +6242,7 @@
if ((flags & VGR_GLOBAL) == 0)
break;
col = matches[pat_len - 1] + col + 1;
- if (col > line_len)
+ if (col > linelen)
break;
}
}
@@ -6612,7 +6612,7 @@
goto theend;
}
- // Jump to first match if the current window is not 'winfixbuf'
+ // Jump to first match.
if (!qf_list_empty(qf_get_curlist(qi)))
{
if ((args.flags & VGR_NOJUMP) == 0)