diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2022-09-25 00:07:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-25 06:07:59 +0800 |
commit | b0fcdf9f099b17198630025a700e87f05b4e3a84 (patch) | |
tree | 32ff78f0396b159d224d6723ac1d82752a622916 /src/nvim/digraph.c | |
parent | 8317b9199edc6936fec829f4908f9c74dc874ce4 (diff) | |
download | rneovim-b0fcdf9f099b17198630025a700e87f05b4e3a84.tar.gz rneovim-b0fcdf9f099b17198630025a700e87f05b4e3a84.tar.bz2 rneovim-b0fcdf9f099b17198630025a700e87f05b4e3a84.zip |
vim-patch:9.0.0576: unused loop variables (#20326)
Problem: Unused loop variables.
Solution: Use a while loop instead. (closes vim/vim#11214)
https://github.com/vim/vim/commit/b2209f213e2931cf3313b24868a9165bbb717cc4
Diffstat (limited to 'src/nvim/digraph.c')
-rw-r--r-- | src/nvim/digraph.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c index c0e7a6250e..1267d49ad1 100644 --- a/src/nvim/digraph.c +++ b/src/nvim/digraph.c @@ -1578,7 +1578,7 @@ static int getexactdigraph(int char1, int char2, bool meta_char) if (retval == 0) { dp = digraphdefault; - for (int i = 0; dp->char1 != 0; i++) { + while (dp->char1 != 0) { if (((int)dp->char1 == char1) && ((int)dp->char2 == char2)) { retval = dp->result; break; @@ -1707,7 +1707,7 @@ void listdigraphs(bool use_headers) const digr_T *dp = digraphdefault; - for (int i = 0; dp->char1 != NUL && !got_int; i++) { + while (dp->char1 != NUL && !got_int) { digr_T tmp; // May need to convert the result to 'encoding'. @@ -1759,7 +1759,7 @@ void digraph_getlist_common(bool list_all, typval_T *rettv) if (list_all) { dp = digraphdefault; - for (int i = 0; dp->char1 != NUL && !got_int; i++) { + while (dp->char1 != NUL && !got_int) { digr_T tmp; tmp.char1 = dp->char1; tmp.char2 = dp->char2; |