Actually, no. sprintf is a function that generates a formatted output string. The warning is because sprintf is being used in a context where its result is not being used. The the problem were due to a failed read the warning would be about using an undefined value instead.