From 2bad338b9d5f14d21106e35f2920cc4335b1c74c Mon Sep 17 00:00:00 2001 From: clanmills Date: Thu, 14 May 2020 10:03:10 +0100 Subject: [PATCH] Fix compiler warning on macOS about enforce condition being always true. --- src/webpimage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webpimage.cpp b/src/webpimage.cpp index 8bf98d33..442cb36c 100644 --- a/src/webpimage.cpp +++ b/src/webpimage.cpp @@ -505,7 +505,7 @@ namespace Exiv2 { enforce(filesize_u32 <= io_->size(), Exiv2::kerCorruptedMetadata); // Check that `filesize_u32` is safe to cast to `long`. - enforce(filesize_u32 <= static_cast(std::numeric_limits::max()), + enforce(filesize_u32 <= static_cast(std::numeric_limits::max()), Exiv2::kerCorruptedMetadata); WebPImage::decodeChunks(static_cast(filesize_u32)); @@ -530,7 +530,7 @@ namespace Exiv2 { const uint32_t size_u32 = Exiv2::getULong(size_buff, littleEndian); // Check that `size_u32` is safe to cast to `long`. - enforce(size_u32 <= static_cast(std::numeric_limits::max()), + enforce(size_u32 <= static_cast(std::numeric_limits::max()), Exiv2::kerCorruptedMetadata); const long size = static_cast(size_u32);