From a9c98dff5d5bcfee7adbc0785e8fbd889eced09b Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Thu, 4 Aug 2022 10:06:04 +0100 Subject: [PATCH] Fix deprecation warning (libtiff) /usr/include/x86_64-linux-gnu/tiff.h:81:45: note: 'uint16' has been explicitly marked deprecated here typedef TIFF_MSC_DEPRECATED uint16_t uint16 TIFF_GCC_DEPRECATED; --- include/mapnik/tiff_io.hpp | 4 ++-- src/tiff_reader.hpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/mapnik/tiff_io.hpp b/include/mapnik/tiff_io.hpp index 6e818f34f..1d09f84ed 100644 --- a/include/mapnik/tiff_io.hpp +++ b/include/mapnik/tiff_io.hpp @@ -207,12 +207,12 @@ struct tag_setter TIFFSetField(output_, TIFFTAG_SAMPLESPERPIXEL, 4); if (data.get_premultiplied()) { - uint16 extras[] = {EXTRASAMPLE_ASSOCALPHA}; + std::uint16_t extras[] = {EXTRASAMPLE_ASSOCALPHA}; TIFFSetField(output_, TIFFTAG_EXTRASAMPLES, 1, extras); } else { - uint16 extras[] = {EXTRASAMPLE_UNASSALPHA}; + std::uint16_t extras[] = {EXTRASAMPLE_UNASSALPHA}; TIFFSetField(output_, TIFFTAG_EXTRASAMPLES, 1, extras); } if (config_.compression == COMPRESSION_DEFLATE || config_.compression == COMPRESSION_ADOBE_DEFLATE || diff --git a/src/tiff_reader.hpp b/src/tiff_reader.hpp index edf9124d8..08fe2df92 100644 --- a/src/tiff_reader.hpp +++ b/src/tiff_reader.hpp @@ -253,8 +253,8 @@ void tiff_reader::init() read_method_ = stripped; } // TIFFTAG_EXTRASAMPLES - uint16 extrasamples = 0; - uint16* sampleinfo = nullptr; + std::uint16_t extrasamples = 0; + std::uint16_t* sampleinfo = nullptr; if (TIFFGetField(tif, TIFFTAG_EXTRASAMPLES, &extrasamples, &sampleinfo)) { has_alpha_ = true; @@ -265,7 +265,7 @@ void tiff_reader::init() } // Try extracting bounding box from geoTIFF tags { - uint16 count = 0; + std::uint16_t count = 0; double* pixelscale; double* tilepoint; if (TIFFGetField(tif, 33550, &count, &pixelscale) == 1 && count == 3 &&