strukturag / libheif

libheif is an HEIF and AVIF file format decoder and encoder.
Other
1.71k stars 298 forks source link

Type conversion warning on new TIFF decoder #1235

Closed kmilos closed 2 months ago

kmilos commented 2 months ago

On just released 1.18.0, both 64-bit and 32-bit:

C:/msys64/home/kmilos/MINGW-packages/mingw-w64-libheif/src/libheif-1.18.0/examples/decoder_tiff.cc:136:22: warning: conversion from 'toff_t' {aka 'long long unsigned int'} to 'off_t' {aka 'long int'} may change value [-Wconversion]
  136 |   if (!seekTIFF(tif, exif_offset, SEEK_SET)) {
      |                      ^~~~~~~~~~~
kmilos commented 2 months ago

There are also a bunch of (unrelated) warnings when building for 32-bit Windows:

https://github.com/msys2/MINGW-packages/actions/runs/9874135726/job/27267905144?pr=21368#step:11:473

I guess still identical to https://github.com/strukturag/libheif/issues/847

farindk commented 2 months ago

@fancycode Can you please have a look at off_t vs toff_t in the TIFF decoder for 32bit systems?

kmilos commented 2 months ago

Can you please have a look at off_t vs toff_t in the TIFF decoder for 32bit systems?

It's not only for 32-bit systems, it happens in any case.

The 32-bit warnings are unrelated, sorry for the confusion by bringing them up here again.