aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-25 07:02:45 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-12-26 00:29:14 -0500
commit6a0242beead9196a60836a375d0207aa50126973 (patch)
treeec4c9e197efcde246bcef7b81ae6769494797642
parent0be59d2b5e5d9460c6f8cbf14898538f30721f89 (diff)
downloadrneovim-6a0242beead9196a60836a375d0207aa50126973.tar.gz
rneovim-6a0242beead9196a60836a375d0207aa50126973.tar.bz2
rneovim-6a0242beead9196a60836a375d0207aa50126973.zip
quickfix: qf_parse_fmt_plus never fails
-rw-r--r--src/nvim/quickfix.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 3c1cebfcf3..71c6f06ac0 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -1341,9 +1341,10 @@ static int qf_parse_fmt_t(regmatch_T *rmp, int midx, qffields_T *fields)
/// Parse the match for '%+' format pattern. The whole matching line is included
/// in the error string. Return the matched line in "fields->errmsg".
-static int qf_parse_fmt_plus(char_u *linebuf,
- size_t linelen,
- qffields_T *fields)
+static void qf_parse_fmt_plus(const char_u *linebuf,
+ size_t linelen,
+ qffields_T *fields)
+ FUNC_ATTR_NONNULL_ALL
{
if (linelen >= fields->errmsglen) {
// linelen + null terminator
@@ -1351,7 +1352,6 @@ static int qf_parse_fmt_plus(char_u *linebuf,
fields->errmsglen = linelen + 1;
}
STRLCPY(fields->errmsg, linebuf, linelen + 1);
- return QF_OK;
}
/// Parse the match for error message ('%m') pattern in regmatch.
@@ -1508,7 +1508,7 @@ static int qf_parse_match(char_u *linebuf, size_t linelen, efm_T *fmt_ptr,
status = qf_parse_fmt_f(regmatch, midx, fields, idx);
} else if (i == 5) {
if (fmt_ptr->flags == '+' && !qf_multiscan) { // %+
- status = qf_parse_fmt_plus(linebuf, linelen, fields);
+ qf_parse_fmt_plus(linebuf, linelen, fields);
} else if (midx > 0) { // %m
status = qf_parse_fmt_m(regmatch, midx, fields);
}