Fix several cppcheck warnings.