CheckBufferOverrun: Fixed Cppcheck warning 'variable scope can be reduced' (found by travis)