diff options
author | Even Rouault <even.rouault@spatialys.com> | 2022-12-13 22:24:39 +0000 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2022-12-13 22:24:39 +0000 |
commit | 38eb7b00cb5767770017fb91743a960ffd96d774 (patch) | |
tree | 9cb328348c04710f1bf692c8e4806b6b00ab1b13 | |
parent | 06910438d1b2da4cc055bd345e68c3d90101e3fe (diff) | |
parent | a9de164cfa3a20b0323a569530e30d2893eed976 (diff) | |
download | libtiff-git-4.5.0rc3.tar.gz |
TIFFAdvanceDirectory()/TIFFUnlinkDirectory(): fix build warnings/errors on OSX...
See merge request libtiff/libtiff!444
-rw-r--r-- | libtiff/tif_dir.c | 7 | ||||
-rw-r--r-- | tools/tiffgt.c | 4 | ||||
-rw-r--r-- | tools/tiffinfo.c | 8 |
3 files changed, 9 insertions, 10 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)) diff --git a/tools/tiffgt.c b/tools/tiffgt.c index 96c692b2..bd7f45af 100644 --- a/tools/tiffgt.c +++ b/tools/tiffgt.c @@ -196,7 +196,7 @@ int main(int argc, char *argv[]) */ glutInitWindowSize(width, height); snprintf(title, TITLE_LENGTH - 1, "%s [%u]", filelist[fileindex], - (unsigned int)TIFFCurrentDirectory(tif)); + TIFFCurrentDirectory(tif)); glutCreateWindow(title); glutDisplayFunc(raster_draw); glutReshapeFunc(raster_reshape); @@ -322,7 +322,7 @@ static void raster_reshape(int win_w, int win_h) glPixelZoom(xratio, yratio); glViewport(0, 0, win_w, win_h); snprintf(title, 1024, "%s [%u] %d%%", filelist[fileindex], - (unsigned int)TIFFCurrentDirectory(tif), ratio); + TIFFCurrentDirectory(tif), ratio); glutSetWindowTitle(title); } diff --git a/tools/tiffinfo.c b/tools/tiffinfo.c index 43436036..6e24d0f0 100644 --- a/tools/tiffinfo.c +++ b/tools/tiffinfo.c @@ -185,11 +185,11 @@ int main(int argc, char *argv[]) { toff_t offset = 0; tdir_t curdir = TIFFCurrentDirectory(tif); - printf("=== TIFF directory %d ===\n", curdir); + printf("=== TIFF directory %u ===\n", curdir); tiffinfo(tif, order, flags, 1); if (TIFFGetField(tif, TIFFTAG_EXIFIFD, &offset)) { - printf("--- EXIF directory within directory %d \n", + printf("--- EXIF directory within directory %u \n", curdir); if (TIFFReadEXIFDirectory(tif, offset)) { @@ -201,7 +201,7 @@ int main(int argc, char *argv[]) } if (TIFFGetField(tif, TIFFTAG_GPSIFD, &offset)) { - printf("--- GPS directory within directory %d \n", + printf("--- GPS directory within directory %u \n", curdir); if (TIFFReadGPSDirectory(tif, offset)) { @@ -223,7 +223,7 @@ int main(int argc, char *argv[]) memcpy(subIFDoffsets, vPtr, nCount * sizeof(subIFDoffsets[0])); printf("--- SubIFD image descriptor tag within " - "TIFF directory %d with array of %d " + "TIFF directory %u with array of %d " "SubIFD chains ---\n", curdir, nCount); for (int i = 0; i < nCount; i++) |