+1
Fixed

[W528] False positive when using for.. in

Lübbe Onken 10 years ago updated by Roman 9 years ago 3

The following section of code results in a false positive W528 "Variable 'StopChar' not used in FOR-loop". This is not a complete and tried example, just an extract from the routine.

FixInsight 2015.10.


TempIndex := NewLineIndex;
for StopChar in StopChars do
    if Self.FBufferedData[TempIndex] <> StopChar then
        Break
    else
        Inc(TempIndex);
+1

I also got a lot of warnings from W528. Sometimes the purpose of the loop is just to repeat some actions without involve the loop-variable. So by nature false positive.