diff --git a/src/bmffimage.cpp b/src/bmffimage.cpp index f8afa9a7..28c8a0c8 100644 --- a/src/bmffimage.cpp +++ b/src/bmffimage.cpp @@ -189,7 +189,7 @@ namespace Exiv2 long BmffImage::boxHandler(std::ostream& out /* = std::cout*/ , Exiv2::PrintStructureOption option /* = kpsNone */,int depth /* =0 */) { long result = (long)io_->size(); - long address = io_->tell(); + long address = (long)io_->tell(); // never visit a box twice! if ( depth == 0 ) visits_.clear(); if (visits_.find(address) != visits_.end() || visits_.size() > visits_max_) { diff --git a/src/image_int.cpp b/src/image_int.cpp index c553e46d..c7c4802a 100644 --- a/src/image_int.cpp +++ b/src/image_int.cpp @@ -61,10 +61,10 @@ namespace Exiv2 { std::stringstream hexOutput; - unsigned long tl = ((size / 16) * 16); - unsigned long tl_offset = (size - tl); + unsigned long tl = (unsigned long)((size / 16) * 16); + unsigned long tl_offset = (unsigned long)(size - tl); - for (unsigned long loop = 0; loop < size; loop++) { + for (unsigned long loop = 0; loop < (unsigned long)size; loop++) { if (data[loop] < 16) { hexOutput << "0"; } diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp index 147fe2c7..cbc96f0a 100644 --- a/src/jpgimage.cpp +++ b/src/jpgimage.cpp @@ -277,7 +277,7 @@ namespace Exiv2 { long pos = sizeFront; while (0 == Photoshop::locateIptcIrb(pPsData + pos, sizePsData - pos, &record, &sizeHdr, &sizeIptc)) { - const long newPos = record - pPsData; + const long newPos = static_cast(record - pPsData); // Copy data up to the IPTC IRB if (newPos > pos) { append(psBlob, pPsData + pos, newPos - pos); diff --git a/src/tiffvisitor_int.cpp b/src/tiffvisitor_int.cpp index 03d0d375..2e89c274 100644 --- a/src/tiffvisitor_int.cpp +++ b/src/tiffvisitor_int.cpp @@ -397,7 +397,7 @@ namespace Exiv2 { std::string::size_type idx = xmpPacket.find_first_of('<'); if (idx != std::string::npos && idx > 0) { #ifndef SUPPRESS_WARNINGS - EXV_WARNING << "Removing " << idx + EXV_WARNING << "Removing " << static_cast(idx) << " characters from the beginning of the XMP packet\n"; #endif xmpPacket = xmpPacket.substr(idx);