0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 9.0.0576: unused loop variables

Problem:    Unused loop variables.
Solution:   Use a while loop instead. (closes #11214)
This commit is contained in:
dundargoc 2022-09-24 15:55:27 +01:00 committed by Bram Moolenaar
parent 78aed95c8d
commit b2209f213e
2 changed files with 5 additions and 3 deletions

View File

@ -1596,7 +1596,7 @@ getexactdigraph(int char1, int char2, int meta_char)
if (retval == 0) if (retval == 0)
{ {
dp = digraphdefault; dp = digraphdefault;
for (i = 0; dp->char1 != 0; ++i) while (dp->char1 != 0)
{ {
if ((int)dp->char1 == char1 && (int)dp->char2 == char2) if ((int)dp->char1 == char1 && (int)dp->char2 == char2)
{ {
@ -1773,7 +1773,7 @@ listdigraphs(int use_headers)
msg_putchar('\n'); msg_putchar('\n');
dp = digraphdefault; dp = digraphdefault;
for (i = 0; dp->char1 != NUL && !got_int; ++i) while (dp->char1 != NUL && !got_int)
{ {
#if defined(USE_UNICODE_DIGRAPHS) #if defined(USE_UNICODE_DIGRAPHS)
digr_T tmp; digr_T tmp;
@ -1876,7 +1876,7 @@ digraph_getlist_common(int list_all, typval_T *rettv)
if (list_all) if (list_all)
{ {
dp = digraphdefault; dp = digraphdefault;
for (i = 0; dp->char1 != NUL && !got_int; ++i) while (dp->char1 != NUL && !got_int)
{ {
#ifdef USE_UNICODE_DIGRAPHS #ifdef USE_UNICODE_DIGRAPHS
digr_T tmp; digr_T tmp;

View File

@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
576,
/**/ /**/
575, 575,
/**/ /**/