add casts for tiff seek
To make our meaning clearer. libtiff uses uint64 for toff_t, with -1 cast to uint64 for an error indication, see: https://gitlab.com/libtiff/libtiff/blob/master/libtiff/tif_unix.c#L123 See also: https://github.com/kleisauke/net-vips/issues/53
This commit is contained in:
parent
8c1c8b6c9f
commit
285f6c7418
|
@ -156,7 +156,9 @@ openin_source_seek( thandle_t st, toff_t position, int whence )
|
||||||
{
|
{
|
||||||
VipsSource *source = VIPS_SOURCE( st );
|
VipsSource *source = VIPS_SOURCE( st );
|
||||||
|
|
||||||
return( vips_source_seek( source, position, whence ) );
|
/* toff_t is usually uint64, with -1 cast to uint64 to indicate error.
|
||||||
|
*/
|
||||||
|
return( (toff_t) vips_source_seek( source, position, whence ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -176,8 +178,10 @@ openin_source_length( thandle_t st )
|
||||||
|
|
||||||
/* libtiff will use this to get file size if tags like StripByteCounts
|
/* libtiff will use this to get file size if tags like StripByteCounts
|
||||||
* are missing.
|
* are missing.
|
||||||
|
*
|
||||||
|
* toff_t is usually uint64, with -1 cast to uint64 to indicate error.
|
||||||
*/
|
*/
|
||||||
return( vips_source_length( source ) );
|
return( (toff_t) vips_source_length( source ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in New Issue