It seems to me that if we get errors both from ferror() and from
fclose() the correct behavior would be to report *both* errors
somehow. Hiding an error is never helpful unless it is known to be
spurious at the time of implementation.
An error in closing the file after an error has already occurred on the file is highly likely to be spurious -- after a file has had a critical error that would warrant closing the file handle unconditionally, you really can't trust its state, so any error that comes up while trying to clean it up probably isn't helpful.
/s/ Adam