AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2017.06.01 15:24 "[Tiff] TIFF printf warnings", by Aaron Boxer
2017.06.01 16:15 "Re: [Tiff] TIFF printf warnings", by Even Rouault
2017.06.01 17:03 "Re: [Tiff] TIFF printf warnings", by Bob Friesenhahn
2017.06.01 18:54 "Re: [Tiff] TIFF printf warnings", by Aaron Boxer
2017.06.02 20:05 "Re: [Tiff] TIFF printf warnings", by Roger Leigh
2017.06.03 00:19 "Re: [Tiff] TIFF printf warnings", by Aaron Boxer

2017.06.01 15:24 "[Tiff] TIFF printf warnings", by Aaron Boxer

Hi Folks,

I am getting the following warnings when building libtiff on 64 bit Ubuntu
with a C++ project with g++ warning level turned up:

/home/aaron/src/grok/thirdparty/libtiff/tif_dirread.c: In function
‘TIFFReadDirectory’:
/home/aaron/src/grok/thirdparty/libtiff/tif_dirread.c:3435:7: warning:
format ‘%llu’ expects argument of type ‘long long unsigned int’, but
argument 4 has type ‘toff_t {aka long unsigned int}’ [-Wformat=]
       "Failed to read directory at offset " TIFF_UINT64_FORMAT,nextdiroff);
       ^
/home/aaron/src/grok/thirdparty/libtiff/tif_dirread.c: In function
‘TIFFReadCustomDirectory’:
/home/aaron/src/grok/thirdparty/libtiff/tif_dirread.c:4211:7: warning:
format ‘%llu’ expects argument of type ‘long long unsigned int’, but
argument 4 has type ‘toff_t {aka long unsigned int}’ [-Wformat=]
       "Failed to read custom directory at offset "
TIFF_UINT64_FORMAT,diroff);
       ^
/home/aaron/src/grok/thirdparty/libtiff/tif_dirread.c: In function
‘CheckDirCount’:
/home/aaron/src/grok/thirdparty/libtiff/tif_dirread.c:4466:2: warning:
format ‘%llu’ expects argument of type ‘long long unsigned int’, but
argument 5 has type ‘uint64 {aka long unsigned int}’ [-Wformat=]

"incorrect count for field \"%s\" (" TIFF_UINT64_FORMAT ", expecting %u); tag

^ /home/aaron/src/grok/thirdparty/libtiff/tif_dirread.c:4473:2: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘uint64 {aka long unsigned int}’ [-Wformat=]

"incorrect count for field \"%s\" (" TIFF_UINT64_FORMAT ", expecting %u); tag

  ^

/home/aaron/src/grok/thirdparty/libtiff/tif_pixarlog.c:831:7: warning:
format ‘%llu’ expects argument of type ‘long long unsigned int’, but
argument 5 has type ‘long unsigned int’ [-Wformat=]
       "Not enough data at scanline %lu (short " TIFF_UINT64_FORMAT "
bytes)",
       ^
[ 51%] Building C object
thirdparty/libtiff/CMakeFiles/tiff.dir/tif_predict.c.o
/home/aaron/src/grok/thirdparty/libtiff/tif_predict.c: In function
‘PredictorEncodeTile’:
/home/aaron/src/grok/thirdparty/libtiff/tif_predict.c:719:26: warning: too
many arguments for format [-Wformat-extra-args]
                          "Out of memory allocating " TIFF_SSIZE_FORMAT "
byte t
                          ^
/home/aaron/src/grok/thirdparty/libtiff/tif_zip.c: In function ‘ZIPDecode’:
/home/aaron/src/grok/thirdparty/libtiff/tif_zip.c:196:7: warning: format
‘%llu’ expects argument of type ‘long long unsigned int’, but argument 5
has type ‘long unsigned int’ [-Wformat=]
       "Not enough data at scanline %lu (short " TIFF_UINT64_FORMAT "
bytes)",
       ^

I am trying to reduce volume of warnings on my project, so if someone has
the time to take a look at these, would be greatly appreciated!

Cheers,

Aaron