Commit 0adcd7d1 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

windowscodecs: Use correct integral type.

parent 26b56e4f
......@@ -1217,7 +1217,8 @@ void BmpDecoder_FindIconMask(BmpDecoder *This, ULONG *mask_offset, int *topdown)
if (This->read_data_func == BmpFrameDecode_ReadUncompressed)
{
/* RGB or BITFIELDS data */
ULONG width, height, bytesperrow, datasize;
UINT width, height;
ULONG bytesperrow, datasize;
IWICBitmapFrameDecode_GetSize(&This->IWICBitmapFrameDecode_iface, &width, &height);
bytesperrow = (((width * This->bitsperpixel)+31)/32)*4;
datasize = bytesperrow * height;
......
......@@ -1331,7 +1331,8 @@ static HRESULT WINAPI DdsDecoder_Dds_GetFrame(IWICDdsDecoder *iface,
LARGE_INTEGER seek;
UINT width, height, depth, block_width, block_height, width_in_blocks, height_in_blocks, size;
UINT frame_width = 0, frame_height = 0, frame_width_in_blocks = 0, frame_height_in_blocks = 0, frame_size = 0;
UINT bytes_per_block, bytesread, i;
UINT bytes_per_block, i;
DWORD bytesread;
DdsFrameDecode *frame_decode = NULL;
TRACE("(%p,%u,%u,%u,%p)\n", iface, arrayIndex, mipLevel, sliceIndex, bitmapFrame);
......
......@@ -250,7 +250,7 @@ typedef struct {
DWORD frame;
struct decoder_frame decoder_frame;
BOOL metadata_initialized;
ULONG metadata_count;
UINT metadata_count;
struct decoder_block* metadata_blocks;
} CommonDecoderFrame;
......
......@@ -101,8 +101,8 @@ static HRESULT ComponentInfo_GetGUIDValue(HKEY classkey, LPCWSTR value,
return hr;
}
static HRESULT ComponentInfo_GetDWORDValue(HKEY classkey, LPCWSTR value,
DWORD *result)
static HRESULT ComponentInfo_GetUINTValue(HKEY classkey, LPCWSTR value,
UINT *result)
{
LONG ret;
DWORD cbdata = sizeof(DWORD);
......@@ -111,7 +111,7 @@ static HRESULT ComponentInfo_GetDWORDValue(HKEY classkey, LPCWSTR value,
return E_INVALIDARG;
ret = RegGetValueW(classkey, NULL, value, RRF_RT_DWORD, NULL,
result, &cbdata);
(DWORD *)result, &cbdata);
if (ret == ERROR_FILE_NOT_FOUND)
{
......@@ -179,7 +179,7 @@ static HRESULT ComponentInfo_GetGuidList(HKEY classkey, LPCWSTR subkeyname,
}
else
{
ret = RegQueryInfoKeyW(subkey, NULL, NULL, NULL, actual_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
ret = RegQueryInfoKeyW(subkey, NULL, NULL, NULL, (DWORD *)actual_size, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
if (ret != ERROR_SUCCESS)
hr = HRESULT_FROM_WIN32(ret);
}
......@@ -552,7 +552,8 @@ static const IWICBitmapDecoderInfoVtbl BitmapDecoderInfo_Vtbl = {
static void read_bitmap_patterns(BitmapDecoderInfo *info)
{
UINT pattern_count=0, patterns_size=0;
DWORD pattern_count=0;
UINT patterns_size=0;
WCHAR subkeyname[11];
LONG res;
HKEY patternskey, patternkey;
......@@ -1353,7 +1354,7 @@ static HRESULT WINAPI PixelFormatInfo_GetBitsPerPixel(IWICPixelFormatInfo2 *ifac
TRACE("(%p,%p)\n", iface, puiBitsPerPixel);
return ComponentInfo_GetDWORDValue(This->classkey, L"BitLength", puiBitsPerPixel);
return ComponentInfo_GetUINTValue(This->classkey, L"BitLength", puiBitsPerPixel);
}
static HRESULT WINAPI PixelFormatInfo_GetChannelCount(IWICPixelFormatInfo2 *iface,
......@@ -1363,7 +1364,7 @@ static HRESULT WINAPI PixelFormatInfo_GetChannelCount(IWICPixelFormatInfo2 *ifac
TRACE("(%p,%p)\n", iface, puiChannelCount);
return ComponentInfo_GetDWORDValue(This->classkey, L"ChannelCount", puiChannelCount);
return ComponentInfo_GetUINTValue(This->classkey, L"ChannelCount", puiChannelCount);
}
static HRESULT WINAPI PixelFormatInfo_GetChannelMask(IWICPixelFormatInfo2 *iface,
......@@ -1413,7 +1414,7 @@ static HRESULT WINAPI PixelFormatInfo_SupportsTransparency(IWICPixelFormatInfo2
TRACE("(%p,%p)\n", iface, pfSupportsTransparency);
return ComponentInfo_GetDWORDValue(This->classkey, L"SupportsTransparency", (DWORD*)pfSupportsTransparency);
return ComponentInfo_GetUINTValue(This->classkey, L"SupportsTransparency", (UINT *)pfSupportsTransparency);
}
static HRESULT WINAPI PixelFormatInfo_GetNumericRepresentation(IWICPixelFormatInfo2 *iface,
......@@ -1423,7 +1424,7 @@ static HRESULT WINAPI PixelFormatInfo_GetNumericRepresentation(IWICPixelFormatIn
TRACE("(%p,%p)\n", iface, pNumericRepresentation);
return ComponentInfo_GetDWORDValue(This->classkey, L"NumericRepresentation", pNumericRepresentation);
return ComponentInfo_GetUINTValue(This->classkey, L"NumericRepresentation", pNumericRepresentation);
}
static const IWICPixelFormatInfo2Vtbl PixelFormatInfo_Vtbl = {
......@@ -1682,7 +1683,7 @@ static HRESULT WINAPI MetadataReaderInfo_DoesRequireFullStream(IWICMetadataReade
{
MetadataReaderInfo *This = impl_from_IWICMetadataReaderInfo(iface);
TRACE("(%p,%p)\n", iface, param);
return ComponentInfo_GetDWORDValue(This->classkey, L"RequiresFullStream", (DWORD *)param);
return ComponentInfo_GetUINTValue(This->classkey, L"RequiresFullStream", (UINT *)param);
}
static HRESULT WINAPI MetadataReaderInfo_DoesSupportPadding(IWICMetadataReaderInfo *iface,
......@@ -1690,7 +1691,7 @@ static HRESULT WINAPI MetadataReaderInfo_DoesSupportPadding(IWICMetadataReaderIn
{
MetadataReaderInfo *This = impl_from_IWICMetadataReaderInfo(iface);
TRACE("(%p,%p)\n", iface, param);
return ComponentInfo_GetDWORDValue(This->classkey, L"SupportsPadding", (DWORD *)param);
return ComponentInfo_GetUINTValue(This->classkey, L"SupportsPadding", (UINT *)param);
}
static HRESULT WINAPI MetadataReaderInfo_DoesRequireFixedSize(IWICMetadataReaderInfo *iface,
......@@ -1826,7 +1827,8 @@ static const IWICMetadataReaderInfoVtbl MetadataReaderInfo_Vtbl = {
static void read_metadata_patterns(MetadataReaderInfo *info, GUID *container_guid,
struct metadata_container *container)
{
UINT pattern_count=0, patterns_size=0;
DWORD pattern_count=0;
UINT patterns_size=0;
WCHAR subkeyname[11], guidkeyname[39];
LONG res;
HKEY containers_key, guid_key, patternkey;
......
......@@ -265,7 +265,7 @@ struct decoder_info
struct decoder_stat
{
DWORD flags;
DWORD frame_count;
UINT frame_count;
};
struct decoder_frame
......@@ -361,7 +361,7 @@ struct encoder_frame
UINT bpp;
BOOL indexed;
DOUBLE dpix, dpiy;
DWORD num_colors;
UINT num_colors;
WICColor palette[256];
/* encoder options */
BOOL interlace;
......
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