It appears that the index value of a for
loop changes
within a nested function. In some cases, nested functions can be called by
callbacks or other function calls leading to the loop index changing. This kind
of bug is exceptionally hard to find, so Code Analyzer signals this situation
even though in many cases the usage is benign.
Change the name of the for
loop index or the variable of the same name in the
nested function. If you must keep them as is, add a comment indicating the need
and suppress the message as described in Adjust Code Analyzer Message Indicators and Messages.