2012.07.06 19:28 "[Tiff] Challenge to properly eliminate warning", by Bob Friesenhahn

2012.07.08 16:47 "Re: [Tiff] Challenge to properly eliminate warning", by Bob Friesenhahn

TIFFDirEntry*
direntry, uint8* value)
 {
        enum TIFFReadDirEntryErr err;
+ *value = 0;

That was my first thought (and what I will likely do) but with such carefully articulated code I was worried I might cover up an actual minor error which might be solved.

Are we guaranteed that value != NULL for all calls to TIFFReadDirEntryByte()?

One would assume so since none of the code under this routine checks for null pointer. Presumably the check is at point of allocation.

I did submit this "fix" yesterday but did not feel particularly good about it since it was not clear why the compiler warned.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/