Commit 81afb288 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

windowscodecs: Avoid signed-unsigned integer comparisons.

parent 23bf25b0
...@@ -293,7 +293,7 @@ static HRESULT ReadIcoDib(IStream *stream, IcoFrameDecode *result) ...@@ -293,7 +293,7 @@ static HRESULT ReadIcoDib(IStream *stream, IcoFrameDecode *result)
{ {
/* If the alpha channel is fully transparent, we should ignore it. */ /* If the alpha channel is fully transparent, we should ignore it. */
int nonzero_alpha = 0; int nonzero_alpha = 0;
int i; UINT i;
for (i=0; i<(result->height*result->width); i++) for (i=0; i<(result->height*result->width); i++)
{ {
......
...@@ -539,7 +539,8 @@ static HRESULT WINAPI BitmapDecoderInfo_MatchesPattern(IWICBitmapDecoderInfo *if ...@@ -539,7 +539,8 @@ static HRESULT WINAPI BitmapDecoderInfo_MatchesPattern(IWICBitmapDecoderInfo *if
WICBitmapPattern *patterns; WICBitmapPattern *patterns;
UINT pattern_count=0, patterns_size=0; UINT pattern_count=0, patterns_size=0;
HRESULT hr; HRESULT hr;
int i, pos; UINT i;
ULONG pos;
BYTE *data=NULL; BYTE *data=NULL;
ULONG datasize=0; ULONG datasize=0;
ULONG bytesread; ULONG bytesread;
...@@ -1900,7 +1901,7 @@ static HRESULT WINAPI ComponentEnum_Next(IEnumUnknown *iface, ULONG celt, ...@@ -1900,7 +1901,7 @@ static HRESULT WINAPI ComponentEnum_Next(IEnumUnknown *iface, ULONG celt,
IUnknown **rgelt, ULONG *pceltFetched) IUnknown **rgelt, ULONG *pceltFetched)
{ {
ComponentEnum *This = impl_from_IEnumUnknown(iface); ComponentEnum *This = impl_from_IEnumUnknown(iface);
int num_fetched=0; ULONG num_fetched=0;
ComponentEnumItem *item; ComponentEnumItem *item;
HRESULT hr=S_OK; HRESULT hr=S_OK;
...@@ -1929,7 +1930,7 @@ static HRESULT WINAPI ComponentEnum_Next(IEnumUnknown *iface, ULONG celt, ...@@ -1929,7 +1930,7 @@ static HRESULT WINAPI ComponentEnum_Next(IEnumUnknown *iface, ULONG celt,
static HRESULT WINAPI ComponentEnum_Skip(IEnumUnknown *iface, ULONG celt) static HRESULT WINAPI ComponentEnum_Skip(IEnumUnknown *iface, ULONG celt)
{ {
ComponentEnum *This = impl_from_IEnumUnknown(iface); ComponentEnum *This = impl_from_IEnumUnknown(iface);
int i; ULONG i;
HRESULT hr=S_OK; HRESULT hr=S_OK;
TRACE("(%p,%u)\n", iface, celt); TRACE("(%p,%u)\n", iface, celt);
......
...@@ -998,7 +998,8 @@ static HRESULT WINAPI JpegEncoder_Frame_WritePixels(IWICBitmapFrameEncode *iface ...@@ -998,7 +998,8 @@ static HRESULT WINAPI JpegEncoder_Frame_WritePixels(IWICBitmapFrameEncode *iface
JpegEncoder *This = impl_from_IWICBitmapFrameEncode(iface); JpegEncoder *This = impl_from_IWICBitmapFrameEncode(iface);
jmp_buf jmpbuf; jmp_buf jmpbuf;
BYTE *swapped_data = NULL, *current_row; BYTE *swapped_data = NULL, *current_row;
int line, row_size; UINT line;
int row_size;
TRACE("(%p,%u,%u,%u,%p)\n", iface, lineCount, cbStride, cbBufferSize, pbPixels); TRACE("(%p,%u,%u,%u,%p)\n", iface, lineCount, cbStride, cbBufferSize, pbPixels);
EnterCriticalSection(&This->lock); EnterCriticalSection(&This->lock);
...@@ -1061,7 +1062,7 @@ static HRESULT WINAPI JpegEncoder_Frame_WritePixels(IWICBitmapFrameEncode *iface ...@@ -1061,7 +1062,7 @@ static HRESULT WINAPI JpegEncoder_Frame_WritePixels(IWICBitmapFrameEncode *iface
{ {
if (This->format->swap_rgb) if (This->format->swap_rgb)
{ {
int x; UINT x;
memcpy(swapped_data, pbPixels + (cbStride * line), row_size); memcpy(swapped_data, pbPixels + (cbStride * line), row_size);
......
...@@ -98,7 +98,7 @@ HRESULT copy_pixels(UINT bpp, const BYTE *srcbuffer, ...@@ -98,7 +98,7 @@ HRESULT copy_pixels(UINT bpp, const BYTE *srcbuffer,
if (row_offset % 8 == 0) if (row_offset % 8 == 0)
{ {
/* everything lines up on a byte boundary */ /* everything lines up on a byte boundary */
UINT row; INT row;
const BYTE *src; const BYTE *src;
BYTE *dst; BYTE *dst;
......
...@@ -60,7 +60,7 @@ static inline MetadataHandler *impl_from_IWICPersistStream(IWICPersistStream *if ...@@ -60,7 +60,7 @@ static inline MetadataHandler *impl_from_IWICPersistStream(IWICPersistStream *if
static void MetadataHandler_FreeItems(MetadataHandler *This) static void MetadataHandler_FreeItems(MetadataHandler *This)
{ {
int i; DWORD i;
for (i=0; i<This->item_count; i++) for (i=0; i<This->item_count; i++)
{ {
...@@ -555,7 +555,7 @@ static HRESULT WINAPI MetadataHandlerEnum_Next(IWICEnumMetadataItem *iface, ...@@ -555,7 +555,7 @@ static HRESULT WINAPI MetadataHandlerEnum_Next(IWICEnumMetadataItem *iface,
MetadataHandlerEnum *This = impl_from_IWICEnumMetadataItem(iface); MetadataHandlerEnum *This = impl_from_IWICEnumMetadataItem(iface);
ULONG new_index; ULONG new_index;
HRESULT hr=S_FALSE; HRESULT hr=S_FALSE;
int i; ULONG i;
TRACE("(%p,%i)\n", iface, celt); TRACE("(%p,%i)\n", iface, celt);
......
...@@ -592,7 +592,7 @@ static HRESULT WINAPI PaletteImpl_IsGrayscale(IWICPalette *iface, BOOL *pfIsGray ...@@ -592,7 +592,7 @@ static HRESULT WINAPI PaletteImpl_IsGrayscale(IWICPalette *iface, BOOL *pfIsGray
static HRESULT WINAPI PaletteImpl_HasAlpha(IWICPalette *iface, BOOL *pfHasAlpha) static HRESULT WINAPI PaletteImpl_HasAlpha(IWICPalette *iface, BOOL *pfHasAlpha)
{ {
PaletteImpl *This = impl_from_IWICPalette(iface); PaletteImpl *This = impl_from_IWICPalette(iface);
int i; UINT i;
TRACE("(%p,%p)\n", iface, pfHasAlpha); TRACE("(%p,%p)\n", iface, pfHasAlpha);
......
...@@ -178,7 +178,7 @@ static void NearestNeighbor_CopyScanline(BitmapScaler *This, ...@@ -178,7 +178,7 @@ static void NearestNeighbor_CopyScanline(BitmapScaler *This,
UINT dst_x, UINT dst_y, UINT dst_width, UINT dst_x, UINT dst_y, UINT dst_width,
BYTE **src_data, UINT src_data_x, UINT src_data_y, BYTE *pbBuffer) BYTE **src_data, UINT src_data_x, UINT src_data_y, BYTE *pbBuffer)
{ {
int i; UINT i;
UINT bytesperpixel = This->bpp/8; UINT bytesperpixel = This->bpp/8;
UINT src_x, src_y; UINT src_x, src_y;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment