OpenImageIO/oiio — pull request #413 by lgritz (2012-07-25 14:06:59+00:00)
Title: Review: Kevin Brightwell's error checking and warning fixes

This is just a squash and minor cleanup of #396. LG fixed a few bugs and rearranged the parameter ordering of those fread/fwrite helper functions (to match the built-in one, less confusing that way). It changed enough that I thought it worth showing everybody before a commit. I couldn't amend Kevin's pull request, so I just submitted another, but this is really just a revision of that request.

Here's the final log entry:

Fix many compiler warnings and beef up I/O error checking:
* Many cases where we were ignoring the results of fread or fwrite, so
now we religiously check the results and set errors appropriately
(this affected bmp, fits, ico, jpeg2000, sgi, targa, tiff, webp, zfile).
* Some unused variables.
This work was mostly Kevin Brightwell, with a cleanup pass by Larry Gritz.