Changes to comply with CodePro AnalytiX, although I have come to the conclusion that I should not care about declarations in loops a little late
Fix #1