Skip to content

Commit

Permalink
patch 9.0.0576: unused loop variables
Browse files Browse the repository at this point in the history
Problem:    Unused loop variables.
Solution:   Use a while loop instead. (closes #11214)
  • Loading branch information
dundargoc authored and brammool committed Sep 24, 2022
1 parent 78aed95 commit b2209f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/digraph.c
Expand Up @@ -1596,7 +1596,7 @@ getexactdigraph(int char1, int char2, int meta_char)
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)
{
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1876,7 +1876,7 @@ digraph_getlist_common(int list_all, typval_T *rettv)
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;
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -699,6 +699,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
576,
/**/
575,
/**/
Expand Down

0 comments on commit b2209f2

Please sign in to comment.