From 8d5fbea923d0909416a840d3a70570cef80800f0 Mon Sep 17 00:00:00 2001
From: Even Rouault <[EMAIL REDACTED]>
Date: Tue, 13 Dec 2022 22:45:19 +0100
Subject: [PATCH] TIFFAdvanceDirectory()/TIFFUnlinkDirectory(): fix build
warnings/errors on OSX due to uint16_t->tdir_t type change
---
libtiff/tif_dir.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c
index 901dff82..4a366545 100644
--- a/libtiff/tif_dir.c
+++ b/libtiff/tif_dir.c
@@ -1982,8 +1982,8 @@ static int TIFFAdvanceDirectory(TIFF *tif, uint64_t *nextdiroff, uint64_t *off,
{
TIFFWarningExtR(
tif, module,
- "the next directory %" PRIu16 " at offset 0x%" PRIx64
- " (%" PRIu64 ") might be an IFD loop. Treating directory %d as "
+ "the next directory %u at offset 0x%" PRIx64 " (%" PRIu64
+ ") might be an IFD loop. Treating directory %d as "
"last directory",
*nextdirnum, *nextdiroff, *nextdiroff, (int)(*nextdirnum) - 1);
*nextdiroff = 0;
@@ -2160,8 +2160,7 @@ int TIFFUnlinkDirectory(TIFF *tif, tdir_t dirn)
{
if (nextdir == 0)
{
- TIFFErrorExtR(tif, module, "Directory %" PRIu16 " does not exist",
- dirn);
+ TIFFErrorExtR(tif, module, "Directory %u does not exist", dirn);
return (0);
}
if (!TIFFAdvanceDirectory(tif, &nextdir, &off, &nextdirnum))