Fix some vera++ and cppcheck errors