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

2012.07.07 14:13 "Re: [Tiff] Challenge to properly eliminate warning", by Bob Friesenhahn

Proposal: at the beginning of TIFFReadDirEntryByte(), add:

Index: tif_dirread.c
===================================================================

--- tif_dirread.c       (révision 24659)
+++ tif_dirread.c       (copie de travail)

@@ -197,6 +197,7 @@
 static enum TIFFReadDirEntryErr TIFFReadDirEntryByte(TIFF* tif, 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.

> Other track: the warning only appears with GCC 4.7.0. I tried GCC 3.4, 4.1,

> 4.3, 4.4, 4.5 and 4.6, clang 3.0 and 3.1, and none emits the warning. Perhaps > is it a bug of GCC 4.7.0?

Quite possibly. I still have not built and installed GCC 4.7.1...

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