diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-25 12:58:14 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-25 12:58:36 +0800 |
commit | 88738bd28fe078441d44337873e8f156cb22af29 (patch) | |
tree | 454261e5ad84f849e2d7d4f8a00f786a6f60d16a | |
parent | 711635872debd52930fac6d0a8f4204e7cc8d258 (diff) | |
download | rneovim-88738bd28fe078441d44337873e8f156cb22af29.tar.gz rneovim-88738bd28fe078441d44337873e8f156cb22af29.tar.bz2 rneovim-88738bd28fe078441d44337873e8f156cb22af29.zip |
vim-patch:8.2.1728: compiler warning for using uninitialized variable
Problem: Compiler warning for using uninitialized variable. (John Marriott)
Solution: Initialize "neighbor".
https://github.com/vim/vim/commit/c53e9c57a9846655c2d3169788f4beefa6d22d90
-rw-r--r-- | src/nvim/search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index 1c54dafcb1..6b390294c0 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -4868,7 +4868,7 @@ static int fuzzy_match_compute_score(const char_u *const str, const int strSz, if (currIdx > 0) { // Camel case const char_u *p = str; - int neighbor; + int neighbor = ' '; for (uint32_t sidx = 0; sidx < currIdx; sidx++) { neighbor = utf_ptr2char((char *)p); |