Fiexed some cppcheck warnings

Merged Jan Möbius requested to merge cppcheck_warnings into master

Fixed more warnings

Merge request reports