From 21264ec2b4767a7305696bd4025729d06a233eed Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Mon, 26 Jul 2021 13:04:30 +0100 Subject: [PATCH 1/2] Fix build error when EXIV2_DEBUG_MESSAGES is enabled. --- src/jpgimage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp index f28c71127c..70aa9908f2 100644 --- a/src/jpgimage.cpp +++ b/src/jpgimage.cpp @@ -693,7 +693,7 @@ namespace Exiv2 { if (size >= 16) { out.write(reinterpret_cast(buf.pData_ + 16), size - 16); #ifdef EXIV2_DEBUG_MESSAGES - std::cout << "iccProfile size = " << icc.size_ << std::endl; + std::cout << "iccProfile size = " << size - 16 << std::endl; #endif } } else if (option == kpsIptcErase && signature.compare("Photoshop 3.0") == 0) { From f0371af425faa1c7e102fe878b711a3fe1783a04 Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Mon, 26 Jul 2021 13:30:55 +0100 Subject: [PATCH 2/2] Fix warning: comparison of integer expressions of different signedness --- src/iptc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iptc.cpp b/src/iptc.cpp index 27e4eb1241..75024f3212 100644 --- a/src/iptc.cpp +++ b/src/iptc.cpp @@ -366,7 +366,7 @@ namespace Exiv2 { sprintf(buff, " %6d | %7d | %-24s | %6d | ", record, dataset, Exiv2::IptcDataSets::dataSetName(dataset, record).c_str(), len); - enforce(bytes.size() - i >= 5 + len, kerCorruptedMetadata); + enforce(bytes.size() - i >= 5 + static_cast(len), kerCorruptedMetadata); out << buff << Internal::binaryToString(makeSlice(bytes, i + 5, i + 5 + (len > 40 ? 40 : len))) << (len > 40 ? "..." : "") << std::endl;