Remove some cppcheck warnings