diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-08-16 20:37:26 +0300 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2022-08-16 20:37:26 +0300 |
commit | 3c316057a0e6dae324f92a3bef2c31c398c2ea51 (patch) | |
tree | 52c178827746c520c97f9e88548449f8e8bee0f6 /src/3rdparty/libtiff/libtiff/tif_thunder.c | |
parent | 425808b1876d9ab5bf7d83a74277770d2bdb1ef2 (diff) | |
parent | 95da4f8f81271e0d76acfffdff563259d5765e43 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.6' into tqtc/lts-5.15-opensourcev5.15.6-lts-lgpl
Change-Id: I5356ec1f7e44017b6337fc9451c1c04104eeb233
Diffstat (limited to 'src/3rdparty/libtiff/libtiff/tif_thunder.c')
-rw-r--r-- | src/3rdparty/libtiff/libtiff/tif_thunder.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/3rdparty/libtiff/libtiff/tif_thunder.c b/src/3rdparty/libtiff/libtiff/tif_thunder.c index db6383a..3e703d8 100644 --- a/src/3rdparty/libtiff/libtiff/tif_thunder.c +++ b/src/3rdparty/libtiff/libtiff/tif_thunder.c @@ -61,7 +61,7 @@ static const int threebitdeltas[8] = { 0, 1, 2, 3, 0, -3, -2, -1 }; if (npixels++ & 1) \ *op++ |= lastpixel; \ else \ - op[0] = (uint8) (lastpixel << 4); \ + op[0] = (uint8_t) (lastpixel << 4); \ } \ } @@ -83,7 +83,7 @@ ThunderSetupDecode(TIFF* tif) } static int -ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels) +ThunderDecode(TIFF* tif, uint8_t* op, tmsize_t maxpixels) { static const char module[] = "ThunderDecode"; register unsigned char *bp; @@ -114,7 +114,7 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels) npixels += n; if (npixels < maxpixels) { for (; n > 0; n -= 2) - *op++ = (uint8) lastpixel; + *op++ = (uint8_t) lastpixel; } if (n == -1) *--op &= 0xf0; @@ -139,24 +139,15 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels) break; } } - tif->tif_rawcp = (uint8*) bp; + tif->tif_rawcp = (uint8_t*) bp; tif->tif_rawcc = cc; if (npixels != maxpixels) { -#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) TIFFErrorExt(tif->tif_clientdata, module, - "%s data at scanline %lu (%I64u != %I64u)", + "%s data at scanline %lu (%"PRIu64" != %"PRIu64")", npixels < maxpixels ? "Not enough" : "Too much", (unsigned long) tif->tif_row, - (unsigned __int64) npixels, - (unsigned __int64) maxpixels); -#else - TIFFErrorExt(tif->tif_clientdata, module, - "%s data at scanline %lu (%llu != %llu)", - npixels < maxpixels ? "Not enough" : "Too much", - (unsigned long) tif->tif_row, - (unsigned long long) npixels, - (unsigned long long) maxpixels); -#endif + (uint64_t) npixels, + (uint64_t) maxpixels); return (0); } @@ -164,10 +155,10 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels) } static int -ThunderDecodeRow(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s) +ThunderDecodeRow(TIFF* tif, uint8_t* buf, tmsize_t occ, uint16_t s) { static const char module[] = "ThunderDecodeRow"; - uint8* row = buf; + uint8_t* row = buf; (void) s; if (occ % tif->tif_scanlinesize) |