changeset 30481:ac6b2ee967f1 v9.0.0576

patch 9.0.0576: unused loop variables Commit: https://github.com/vim/vim/commit/b2209f213e2931cf3313b24868a9165bbb717cc4 Author: dundargoc <gocdundar@gmail.com> Date: Sat Sep 24 15:55:27 2022 +0100 patch 9.0.0576: unused loop variables Problem: Unused loop variables. Solution: Use a while loop instead. (closes https://github.com/vim/vim/issues/11214)
author Bram Moolenaar <Bram@vim.org>
date Sat, 24 Sep 2022 17:00:03 +0200
parents 79fc101ece32
children dc376deb7e21
files src/digraph.c src/version.c
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -1596,7 +1596,7 @@ getexactdigraph(int char1, int char2, in
     if (retval == 0)
     {
 	dp = digraphdefault;
-	for (i = 0; dp->char1 != 0; ++i)
+	while (dp->char1 != 0)
 	{
 	    if ((int)dp->char1 == char1 && (int)dp->char2 == char2)
 	    {
@@ -1773,7 +1773,7 @@ listdigraphs(int use_headers)
     msg_putchar('\n');
 
     dp = digraphdefault;
-    for (i = 0; dp->char1 != NUL && !got_int; ++i)
+    while (dp->char1 != NUL && !got_int)
     {
 #if defined(USE_UNICODE_DIGRAPHS)
 	digr_T tmp;
@@ -1876,7 +1876,7 @@ digraph_getlist_common(int list_all, typ
     if (list_all)
     {
 	dp = digraphdefault;
-	for (i = 0; dp->char1 != NUL && !got_int; ++i)
+	while (dp->char1 != NUL && !got_int)
 	{
 #ifdef USE_UNICODE_DIGRAPHS
 	    digr_T tmp;
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    576,
+/**/
     575,
 /**/
     574,