TIFF printf warnings

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

TIFF printf warnings

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



_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TIFF printf warnings

Even Rouault-2

Hi

 

>

> 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!

 

Feel free to submit a patch to fix those.

 

>

> Cheers,

> Aaron

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TIFF printf warnings

Bob Friesenhahn
In reply to this post by Aaron Boxer
On Thu, 1 Jun 2017, Aaron Boxer wrote:

> 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:

It seems like configure or cmake got the TIFF_UINT64_FORMAT definition
incorrect.  Did you configure your build using 'configure' or 'cmake'?

Bob
--
Bob Friesenhahn
[hidden email], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TIFF printf warnings

Aaron Boxer

On Thu, Jun 1, 2017 at 1:03 PM, Bob Friesenhahn <[hidden email]> wrote:
On Thu, 1 Jun 2017, Aaron Boxer wrote:

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:

It seems like configure or cmake got the TIFF_UINT64_FORMAT definition incorrect.  Did you configure your build using 'configure' or 'cmake'?


Thanks! Yes, that was it. I am using cmake,
but my libtiff cmake file has diverged from standard file.
Just need to change %llu to %lu.

Cheers,
Aaron

_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TIFF printf warnings

rleigh
On 01/06/2017 18:54, Aaron Boxer wrote:

>
> On Thu, Jun 1, 2017 at 1:03 PM, Bob Friesenhahn
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     On Thu, 1 Jun 2017, Aaron Boxer wrote:
>
>         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:
>
>
>     It seems like configure or cmake got the TIFF_UINT64_FORMAT
>     definition incorrect.  Did you configure your build using
>     'configure' or 'cmake'?
>
>
>
> Thanks! Yes, that was it. I am using cmake,
> but my libtiff cmake file has diverged from standard file.
> Just need to change %llu to %lu.

Just to double check, there's nothing which we need to fix in the CVS
copy of CMakeLists.txt?

Are there any changes you have made which need integrating?  Or anything
you've encountered which you would like improving?


Thanks,
Roger

_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: TIFF printf warnings

Aaron Boxer

On Fri, Jun 2, 2017 at 4:05 PM, Roger Leigh <[hidden email]> wrote:
On 01/06/2017 18:54, Aaron Boxer wrote:
>
> On Thu, Jun 1, 2017 at 1:03 PM, Bob Friesenhahn
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     On Thu, 1 Jun 2017, Aaron Boxer wrote:
>
>         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:
>
>
>     It seems like configure or cmake got the TIFF_UINT64_FORMAT
>     definition incorrect.  Did you configure your build using
>     'configure' or 'cmake'?
>
>
>
> Thanks! Yes, that was it. I am using cmake,
> but my libtiff cmake file has diverged from standard file.
> Just need to change %llu to %lu.

Just to double check, there's nothing which we need to fix in the CVS
copy of CMakeLists.txt?

Are there any changes you have made which need integrating?  Or anything
you've encountered which you would like improving?



Thanks for following up, Roger. No, you guys don't need to change anything.
It was my problem : the libtiff cmake file for my project is, I guess, quite old, and I hadn't been
updating it with the latest changes from the project. It's all good now.

Cheers,
Aaron

 


_______________________________________________
Tiff mailing list: [hidden email]
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
Loading...