diff --git a/src/libromdata/tests/img/ImageDecoderTest.cpp b/src/libromdata/tests/img/ImageDecoderTest.cpp index bd159ffae..46f392735 100644 --- a/src/libromdata/tests/img/ImageDecoderTest.cpp +++ b/src/libromdata/tests/img/ImageDecoderTest.cpp @@ -134,8 +134,8 @@ struct ImageDecoderTest_mode }; // Maximum file size for images. -static constexpr size_t MAX_DDS_IMAGE_FILESIZE = 12U*1024U*1024U; -static constexpr size_t MAX_PNG_IMAGE_FILESIZE = 2U*1024U*1024U; +static constexpr off64_t MAX_DDS_IMAGE_FILESIZE = 12U*1024U*1024U; +static constexpr off64_t MAX_PNG_IMAGE_FILESIZE = 2U*1024U*1024U; class ImageDecoderTest : public ::testing::TestWithParam { @@ -272,11 +272,9 @@ void ImageDecoderTest::SetUp(void) /* FIXME: Per-type minimum sizes. * This fails on some very small SVR files. - ASSERT_GT(ddsSize, 4+sizeof(DDS_HEADER)) - << "DDS image is too small."; + ASSERT_GT(ddsSize, 4+sizeof(DDS_HEADER)) << "DDS image is too small."; */ - ASSERT_LE(ddsSize, MAX_DDS_IMAGE_FILESIZE) - << "DDS image is too big."; + ASSERT_LE(static_cast(ddsSize), MAX_DDS_IMAGE_FILESIZE) << "DDS image is too big."; // Read the DDS image into memory. m_dds_buf.resize(ddsSize);