From f443c9e9d747124a676fc328487dca7c94713df3 Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Tue, 15 Jun 2021 10:44:28 +0200 Subject: Patch bundled libtiff to compile on Integrity More recent versions of the compiler works, but for Qt 5.x we support an older version that fails to compile this code. (cherry picked from 5.15 commit) Change-Id: If073e07929eb330766b49087d49531409a7548e5 Reviewed-by: Paul Olav Tvete --- src/3rdparty/libtiff/libtiff/tif_fax3.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/3rdparty/libtiff/libtiff/tif_fax3.c b/src/3rdparty/libtiff/libtiff/tif_fax3.c index 0baf7ad..b79f1f3 100644 --- a/src/3rdparty/libtiff/libtiff/tif_fax3.c +++ b/src/3rdparty/libtiff/libtiff/tif_fax3.c @@ -327,19 +327,23 @@ Fax3Decode2D(TIFF* tif, uint8_t* buf, tmsize_t occ, uint16_t s) } #undef SWAP -# define FILL(n, cp) \ - for (int32_t ifill = 0; ifill < (n); ++ifill) \ +# define FILL(n, cp) { \ + int32_t ifill; \ + for (ifill = 0; ifill < (n); ++ifill) \ { \ (cp)[ifill] = 0xff; \ } \ - (cp) += (n); + (cp) += (n); \ +} -# define ZERO(n, cp) \ - for (int32_t izero = 0; izero < (n); ++izero) \ +# define ZERO(n, cp) { \ + int32_t izero; \ + for (izero = 0; izero < (n); ++izero) \ { \ (cp)[izero] = 0; \ } \ - (cp) += (n); + (cp) += (n); \ +} /* * Bit-fill a row according to the white/black -- cgit v1.2.1