﻿# V621\. Loop may execute incorrectly or may not execute at all\. Consider inspecting the 'for' operator\.

The analyzer has detected a potential error: odd initial and finite counter values are used in the 'for' operator\. It may cause incorrect loop execution and break the program execution logic\.

Consider the following example:

```cpp
signed char i;
for (i = -10; i < 100; i--)
{
  ...
};
```

Perhaps there is a misprint here causing the initial and finite values to be mixed up\. The error may also occur if operators '\+\+' and '\-\-' are mixed up\.

This is the correct code:

```cpp
for (i = -10; i < 100; i++)
{
  ...
};
```

The following code is also correct:

```cpp
for (i = 100; i > -10; i--)
{
...
};
```

Consider the following code sample found by the analyzer in a real application:

```cpp
void CertificateRequest::Build()
{
    ...
    uint16 authCount = 0;

    for (int j = 0; j < authCount; j++) {
      int sz = REQUEST_HEADER + MIN_DIS_SIZE;
      ...
    }
}
```

The 'authCount' variable is initialized by an incorrect value or perhaps there is even some other variable to be used here\.