diff --git a/example1/example1.cpp b/example1/example1.cpp index 4e1a4d65..ac5b3036 100644 --- a/example1/example1.cpp +++ b/example1/example1.cpp @@ -172,7 +172,7 @@ static bool print_dds_info(const void* pData, crn_uint32 data_size) { "DDSD_TEXTURESTAGE", "DDSD_FVF", "DDSD_SRCVBHANDLE", "DDSD_DEPTH"}; printf("DDSD Flags: 0x%08X ", desc.dwFlags); - for (int i = 0; i < sizeof(pDDSDFlagNames) / sizeof(pDDSDFlagNames[0]); i++) + for (size_t i = 0; i < sizeof(pDDSDFlagNames) / sizeof(pDDSDFlagNames[0]); i++) if ((pDDSDFlagNames[i]) && (desc.dwFlags & (1 << i))) printf("%s ", pDDSDFlagNames[i]); printf("\n\n"); @@ -229,7 +229,7 @@ static bool print_dds_info(const void* pData, crn_uint32 data_size) { "DDSCAPS2_CUBEMAP_POSITIVEY", "DDSCAPS2_CUBEMAP_NEGATIVEY", "DDSCAPS2_CUBEMAP_POSITIVEZ", "DDSCAPS2_CUBEMAP_NEGATIVEZ", NULL, NULL, NULL, NULL, NULL, "DDSCAPS2_VOLUME"}; - for (int i = 0; i < sizeof(pDDCAPS2FlagNames) / sizeof(pDDCAPS2FlagNames[0]); i++) + for (size_t i = 0; i < sizeof(pDDCAPS2FlagNames) / sizeof(pDDCAPS2FlagNames[0]); i++) if ((pDDCAPS2FlagNames[i]) && (desc.ddsCaps.dwCaps2 & (1 << i))) printf("%s ", pDDCAPS2FlagNames[i]); printf("\n"); diff --git a/example3/example3.cpp b/example3/example3.cpp index aa11da45..2149cbd0 100644 --- a/example3/example3.cpp +++ b/example3/example3.cpp @@ -202,9 +202,9 @@ int main(int argc, char* argv[]) { // Exact block from image, clamping at the sides of non-divisible by 4 images to avoid artifacts. crn_uint32* pDst_pixels = pixels; - for (int y = 0; y < cDXTBlockSize; y++) { + for (uint y = 0; y < cDXTBlockSize; y++) { const uint actual_y = std::min(height - 1U, (block_y * cDXTBlockSize) + y); - for (int x = 0; x < cDXTBlockSize; x++) { + for (uint x = 0; x < cDXTBlockSize; x++) { const uint actual_x = std::min(width - 1U, (block_x * cDXTBlockSize) + x); *pDst_pixels++ = pSrc_image[actual_x + actual_y * width]; }