Fiexed some cppcheck warnings

7 jobs for cppcheck_warnings in 51 minutes and 19 seconds