Re #10832. Fixing cppcheck errors.