aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-25 13:04:03 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-08-25 13:06:33 +0800
commite7dd65eea382707e07b1f061298c4660d02022e5 (patch)
treeb50385da4818a1d616ff530012d064ab8927d8b2 /src
parent7656cd527bc22c9899f98d6a08a2b98de51d6f68 (diff)
downloadrneovim-e7dd65eea382707e07b1f061298c4660d02022e5.tar.gz
rneovim-e7dd65eea382707e07b1f061298c4660d02022e5.tar.bz2
rneovim-e7dd65eea382707e07b1f061298c4660d02022e5.zip
vim-patch:8.2.2826: compiler warnings for int to size_t conversion
Problem: Compiler warnings for int to size_t conversion. (Randall W. Morris) Solution: Add type casts. https://github.com/vim/vim/commit/551c1aed65817558ac1ece541c246ea585645807 Still keep it size_t, but avoid calculating multiple times.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/quickfix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c
index 5925f249a2..4d6f7a0f36 100644
--- a/src/nvim/quickfix.c
+++ b/src/nvim/quickfix.c
@@ -5140,6 +5140,7 @@ static bool vgr_match_buflines(qf_list_T *qfl, char *fname, buf_T *buf, char *sp
FUNC_ATTR_NONNULL_ARG(1, 3, 4, 5, 6)
{
bool found_match = false;
+ const size_t pat_len = STRLEN(spat);
for (linenr_T lnum = 1; lnum <= buf->b_ml.ml_line_count && *tomatch > 0; lnum++) {
colnr_T col = 0;
@@ -5181,7 +5182,6 @@ static bool vgr_match_buflines(qf_list_T *qfl, char *fname, buf_T *buf, char *sp
}
}
} else {
- const size_t pat_len = STRLEN(spat);
char *const str = (char *)ml_get_buf(buf, lnum, false);
int score;
uint32_t matches[MAX_FUZZY_MATCHES];