Fix some cppcheck warnings.