diff --git a/src/pngchunk_int.cpp b/src/pngchunk_int.cpp index f81b560a..76e81e9e 100644 --- a/src/pngchunk_int.cpp +++ b/src/pngchunk_int.cpp @@ -190,7 +190,8 @@ namespace Exiv2 { string_from_unterminated((const char*)(data.pData_ + Safe::add(keysize, 3)), languageTextMaxSize); const size_t languageTextSize = languageText.size(); - enforce(data.size_ >= Safe::add(static_cast(Safe::add(keysize, 4)), languageTextSize), + enforce(static_cast(data.size_) >= + Safe::add(static_cast(Safe::add(keysize, 4)), languageTextSize), Exiv2::kerCorruptedMetadata); // translated keyword string after the language description std::string translatedKeyText = diff --git a/unitTests/test_futils.cpp b/unitTests/test_futils.cpp index cba26946..47e6c481 100644 --- a/unitTests/test_futils.cpp +++ b/unitTests/test_futils.cpp @@ -132,7 +132,8 @@ TEST(base64decode, decodesValidString) const std::string original ("VGhpcyBpcyBhIHVuaXQgdGVzdA=="); const std::string expected ("This is a unit test"); char * result = new char [original.size()]; - ASSERT_EQ(expected.size()+1, base64decode(original.c_str(), result, original.size())); + ASSERT_EQ(static_cast(expected.size()+1), + base64decode(original.c_str(), result, original.size())); ASSERT_STREQ(expected.c_str(), result); delete [] result; } @@ -151,4 +152,4 @@ TEST(AUri, parsesAndDecoreUrl) ASSERT_EQ("", uri.Password); Uri::Decode(uri); -} \ No newline at end of file +}