diff --git a/src/convert.cpp b/src/convert.cpp index 80d07bab..cafb1a02 100644 --- a/src/convert.cpp +++ b/src/convert.cpp @@ -1541,7 +1541,7 @@ namespace { bool ret = true; iconv_t cd; cd = iconv_open(to, from); - if (cd == (iconv_t)(-1)) { + if (!cd) { #ifndef SUPPRESS_WARNINGS EXV_WARNING << "iconv_open: " << strError() << "\n"; #endif @@ -1570,7 +1570,7 @@ namespace { } outstr.append(std::string(outbuf, outbytesProduced)); } - if (cd != (iconv_t)(-1)) { + if (cd) { iconv_close(cd); } diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp index ed3c4692..0de05ee7 100644 --- a/src/jpgimage.cpp +++ b/src/jpgimage.cpp @@ -1059,7 +1059,7 @@ namespace Exiv2 { pad[0] = static_cast(chunk + 1); pad[1] = static_cast(chunks); outIo.write(reinterpret_cast(iccId_), 12); - outIo.write((const byte*)pad, 2); + outIo.write(reinterpret_cast(pad), 2); if (outIo.write(iccProfile_.c_data(chunk * chunk_size), bytes) != bytes) throw Error(kerImageWriteFailed); if (outIo.error())