2022.04.18 15:08 "[Tiff] FW: File Offset Truncation due to incorrectr data typing for Return Argument in TIFF_WriteOverview", by Mike Stanton

2022.04.18 15:08 "[Tiff] FW: File Offset Truncation due to incorrectr data typing for Return Argument in TIFF_WriteOverview", by Mike Stanton

For my work I am dealing with a very large mosaic TIFF of 1.5TB. It is my intent to take that large file and carve it up into 256X256 tiles for WMS. While doing my build of the Tiff Library for 4.3.0 I fount a number of warnings of possible data loss cases because of truncation of Variables, specifically File offsets. I realize the diagnostic can be ignored but doing so may lead to data corruption or loss of content. So I started going through the code and the very first one was a Warning C4244 message

The returned parameter is of a uint64_t data type but the function declaration and definitions are both done with a uint32_t Value. Attached are screenshots of the various definitions and usages taken from a Visual Studio code inspection in which I was engaging because of the alarming number of Warning messages of this type that I was seeing. Most of them are innocuous but some could result in data loss when using large files.

I am willing to make the necessary changes to correct all the C4244 Warnings and other related changes to get a clean compile if nobody else has done so because another project I was on formy former employer taught me that leaving these warnings in place without following proper typecasting protocols when changing radix scales yields unpredictable errors. Please advise. Am I missing something? Am I on a fool's Errand?

Michael Stanton
GEOSPAN Corporation
www.geospan.com<http://www.geospan.com>