Issues deteced by Static Code Analysis fixed

  * Commit consists of fixes issues from Parsoft C++ test