removed unused variables
Merge pull request #6342 from cheekiatng/TIMOB-18029

[TIMOB-18029] iOS: Fix all optimization type errors detected by static analyzer