msvcrt has been split in several patches for easier review (not over yet)
A+ ---
Eric Pouech (11): dlls/wbemprox: use correct integral type dlls/windowscodecs,wmphoto: use correct integral type dlls/winegstreamer: use correct integral type dlls/winhttp: use correct integral type dlls/winmm: use correct integral type dlls/wldap32: use correct integral type dlls/xaudio2_7: use correct integral type dlls/msvc* and al.: use correct integral types dlls/msvc* and al.: use correct integral type dlls/msvc* and al.: user correct integral types dlls/msvcrt: use correct integral type
dlls/msvcp60/ios.c | 4 +-- dlls/msvcp60/msvcp.h | 2 +- dlls/msvcp90/exception.c | 2 +- dlls/msvcp90/ios.c | 4 +-- dlls/msvcp90/locale.c | 6 ++-- dlls/msvcp90/msvcp90.h | 2 +- dlls/msvcrt/concurrency.c | 6 ++-- dlls/msvcrt/cpp.c | 2 +- dlls/msvcrt/locale.c | 40 +++++++++++++------------- dlls/msvcrt/msvcrt.h | 4 +-- dlls/msvcrt/thread.c | 2 +- dlls/wbemprox/builtin.c | 10 ++++--- dlls/windowscodecs/bmpdecode.c | 3 +- dlls/windowscodecs/ddsformat.c | 3 +- dlls/windowscodecs/decoder.c | 2 +- dlls/windowscodecs/info.c | 26 +++++++++-------- dlls/windowscodecs/wincodecs_private.h | 4 +-- dlls/winegstreamer/audioconvert.c | 4 +-- dlls/winhttp/request.c | 5 ++-- dlls/winmm/waveform.c | 5 ++-- dlls/wldap32/ber.c | 8 +++--- dlls/wldap32/libldap.h | 2 +- dlls/xaudio2_7/xaudio_dll.c | 2 +- 23 files changed, 78 insertions(+), 70 deletions(-)
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/wbemprox/builtin.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c index c71bab80ee2..050e9462a4c 100644 --- a/dlls/wbemprox/builtin.c +++ b/dlls/wbemprox/builtin.c @@ -1939,7 +1939,8 @@ static WCHAR *append_path( const WCHAR *path, const WCHAR *segment, UINT *len ) static WCHAR *get_file_version( const WCHAR *filename ) { VS_FIXEDFILEINFO *info; - DWORD size, len = 4 * 5 + ARRAY_SIZE( L"%u.%u.%u.%u" ); + UINT size; + DWORD len = 4 * 5 + ARRAY_SIZE( L"%u.%u.%u.%u" ); void *block; WCHAR *ret;
@@ -2499,7 +2500,8 @@ static WCHAR *get_ip4_string( DWORD addr ) static enum fill_status fill_ip4routetable( struct table *table, const struct expr *cond ) { struct record_ip4routetable *rec; - UINT i, row = 0, offset = 0, size = 0; + UINT i, row = 0, offset = 0; + ULONG size = 0; MIB_IPFORWARDTABLE *forwards; enum fill_status status = FILL_STATUS_UNFILTERED;
@@ -3710,8 +3712,8 @@ static enum fill_status fill_service( struct table *table, const struct expr *co ENUM_SERVICE_STATUS_PROCESSW *tmp, *services = NULL; SERVICE_STATUS_PROCESS *status; WCHAR sysnameW[MAX_COMPUTERNAME_LENGTH + 1]; - DWORD len = ARRAY_SIZE( sysnameW ); - UINT i, row = 0, offset = 0, size = 256, needed, count; + DWORD len = ARRAY_SIZE( sysnameW ), needed, count; + UINT i, row = 0, offset = 0, size = 256; enum fill_status fill_status = FILL_STATUS_FAILED; BOOL ret;
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/windowscodecs/bmpdecode.c | 3 ++- dlls/windowscodecs/ddsformat.c | 3 ++- dlls/windowscodecs/decoder.c | 2 +- dlls/windowscodecs/info.c | 26 ++++++++++++++------------ dlls/windowscodecs/wincodecs_private.h | 4 ++-- 5 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/dlls/windowscodecs/bmpdecode.c b/dlls/windowscodecs/bmpdecode.c index a01dc78c616..888f41a6138 100644 --- a/dlls/windowscodecs/bmpdecode.c +++ b/dlls/windowscodecs/bmpdecode.c @@ -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; diff --git a/dlls/windowscodecs/ddsformat.c b/dlls/windowscodecs/ddsformat.c index f94f6708c2b..5a947a898b9 100644 --- a/dlls/windowscodecs/ddsformat.c +++ b/dlls/windowscodecs/ddsformat.c @@ -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); diff --git a/dlls/windowscodecs/decoder.c b/dlls/windowscodecs/decoder.c index 2c72cdfc1b5..2cd5a2d148f 100644 --- a/dlls/windowscodecs/decoder.c +++ b/dlls/windowscodecs/decoder.c @@ -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;
diff --git a/dlls/windowscodecs/info.c b/dlls/windowscodecs/info.c index cbe8aae572d..7a9ecf52b5a 100644 --- a/dlls/windowscodecs/info.c +++ b/dlls/windowscodecs/info.c @@ -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; diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h index 5fb7720781c..72227cf0cd2 100644 --- a/dlls/windowscodecs/wincodecs_private.h +++ b/dlls/windowscodecs/wincodecs_private.h @@ -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;
Signed-off-by: Esme Povirk esme@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/winegstreamer/audioconvert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c index 33350fb3566..afad3f1bc59 100644 --- a/dlls/winegstreamer/audioconvert.c +++ b/dlls/winegstreamer/audioconvert.c @@ -272,7 +272,7 @@ fail: static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) { GUID major_type, subtype; - DWORD unused; + UINT32 unused; HRESULT hr;
struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); @@ -345,7 +345,7 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i { struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); GUID major_type, subtype; - DWORD unused; + UINT32 unused; HRESULT hr;
TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags);
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/winhttp/request.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index 728b1895ba7..6d885da49a5 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -3581,7 +3581,7 @@ static DWORD socket_drain( struct socket *socket ) return ERROR_SUCCESS; }
-static DWORD receive_close_status( struct socket *socket, unsigned int len ) +static DWORD receive_close_status( struct socket *socket, DWORD len ) { DWORD reason_len, ret;
@@ -3689,7 +3689,8 @@ static DWORD socket_receive( struct socket *socket, void *buf, DWORD len, DWORD static void CALLBACK task_socket_receive( TP_CALLBACK_INSTANCE *instance, void *ctx, TP_WORK *work ) { struct socket_receive *r = ctx; - DWORD ret, count, type; + DWORD ret, count; + WINHTTP_WEB_SOCKET_BUFFER_TYPE type;
TRACE("running %p\n", work); ret = socket_receive( r->socket, r->buf, r->len, &count, &type );
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/winmm/waveform.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index ecffa700662..66444ee82dc 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -183,7 +183,7 @@ typedef struct _WINMM_QueryInterfaceInfo { BOOL is_out; UINT index; WCHAR *str; - UINT *len_bytes; + ULONG *len_bytes; } WINMM_QueryInterfaceInfo;
static LRESULT WOD_Open(WINMM_OpenInfo *info); @@ -1771,7 +1771,8 @@ exit:
static void WID_PullACMData(WINMM_Device *device) { - UINT32 packet, packet_bytes; + UINT32 packet; + DWORD packet_bytes; DWORD flags; BYTE *data; WAVEHDR *queue;
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Thu, Feb 03, 2022 at 11:49:54AM +0100, Eric Pouech wrote:
Signed-off-by: Eric Pouech eric.pouech@gmail.com
dlls/winmm/waveform.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index ecffa700662..66444ee82dc 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -183,7 +183,7 @@ typedef struct _WINMM_QueryInterfaceInfo { BOOL is_out; UINT index; WCHAR *str;
- UINT *len_bytes;
- ULONG *len_bytes;
} WINMM_QueryInterfaceInfo;
static LRESULT WOD_Open(WINMM_OpenInfo *info); @@ -1771,7 +1771,8 @@ exit:
static void WID_PullACMData(WINMM_Device *device) {
- UINT32 packet, packet_bytes;
- UINT32 packet;
- DWORD packet_bytes; DWORD flags; BYTE *data; WAVEHDR *queue;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/wldap32/ber.c | 8 ++++---- dlls/wldap32/libldap.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/wldap32/ber.c b/dlls/wldap32/ber.c index 8387ce36033..f3b18e530b4 100644 --- a/dlls/wldap32/ber.c +++ b/dlls/wldap32/ber.c @@ -145,7 +145,7 @@ void CDECL ber_bvfree( BERVAL *berval ) */ ULONG CDECL ber_first_element( BerElement *ber, ULONG *len, char **opaque ) { - struct ber_first_element_params params = { BER(ber), len, opaque }; + struct ber_first_element_params params = { BER(ber), (unsigned int *)len, opaque }; return LDAP_CALL( ber_first_element, ¶ms ); }
@@ -265,7 +265,7 @@ BerElement * CDECL ber_init( BERVAL *berval ) */ ULONG CDECL ber_next_element( BerElement *ber, ULONG *len, char *opaque ) { - struct ber_next_element_params params = { BER(ber), len, opaque }; + struct ber_next_element_params params = { BER(ber), (unsigned int *)len, opaque }; return LDAP_CALL( ber_next_element, ¶ms ); }
@@ -285,7 +285,7 @@ ULONG CDECL ber_next_element( BerElement *ber, ULONG *len, char *opaque ) */ ULONG CDECL ber_peek_tag( BerElement *ber, ULONG *len ) { - struct ber_peek_tag_params params = { BER(ber), len }; + struct ber_peek_tag_params params = { BER(ber), (unsigned int *)len }; return LDAP_CALL( ber_peek_tag, ¶ms ); }
@@ -305,7 +305,7 @@ ULONG CDECL ber_peek_tag( BerElement *ber, ULONG *len ) */ ULONG CDECL ber_skip_tag( BerElement *ber, ULONG *len ) { - struct ber_skip_tag_params params = { BER(ber), len }; + struct ber_skip_tag_params params = { BER(ber), (unsigned int *)len }; return LDAP_CALL( ber_skip_tag, ¶ms ); }
diff --git a/dlls/wldap32/libldap.h b/dlls/wldap32/libldap.h index c398b501602..65487f16fe6 100644 --- a/dlls/wldap32/libldap.h +++ b/dlls/wldap32/libldap.h @@ -106,7 +106,7 @@ struct ber_alloc_t_params struct ber_first_element_params { void *ber; - ULONG *ret_len; + unsigned int *ret_len; char **last; };
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/xaudio2_7/xaudio_dll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 12383896b42..e5a83ebdbf8 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -1291,7 +1291,7 @@ static void WINAPI XA2M_GetChannelMask(IXAudio2MasteringVoice *iface,
TRACE("%p, %p\n", This, pChannelMask);
- FAudioMasteringVoice_GetChannelMask(This->faudio_voice, pChannelMask); + FAudioMasteringVoice_GetChannelMask(This->faudio_voice, (uint32_t *)pChannelMask); }
static const struct IXAudio2MasteringVoiceVtbl XAudio2MasteringVoice_Vtbl = {
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Thu, Feb 03, 2022 at 11:50:06AM +0100, Eric Pouech wrote:
Signed-off-by: Eric Pouech eric.pouech@gmail.com
dlls/xaudio2_7/xaudio_dll.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c index 12383896b42..e5a83ebdbf8 100644 --- a/dlls/xaudio2_7/xaudio_dll.c +++ b/dlls/xaudio2_7/xaudio_dll.c @@ -1291,7 +1291,7 @@ static void WINAPI XA2M_GetChannelMask(IXAudio2MasteringVoice *iface,
TRACE("%p, %p\n", This, pChannelMask);
- FAudioMasteringVoice_GetChannelMask(This->faudio_voice, pChannelMask);
- FAudioMasteringVoice_GetChannelMask(This->faudio_voice, (uint32_t *)pChannelMask);
}
static const struct IXAudio2MasteringVoiceVtbl XAudio2MasteringVoice_Vtbl = {
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/msvcp60/msvcp.h | 2 +- dlls/msvcp90/exception.c | 2 +- dlls/msvcp90/msvcp90.h | 2 +- dlls/msvcrt/concurrency.c | 6 +++--- dlls/msvcrt/cpp.c | 2 +- dlls/msvcrt/msvcrt.h | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/msvcp60/msvcp.h b/dlls/msvcp60/msvcp.h index 19078a133e4..2e5b24dccef 100644 --- a/dlls/msvcp60/msvcp.h +++ b/dlls/msvcp60/msvcp.h @@ -266,7 +266,7 @@ typedef enum { typedef struct _iosarray { struct _iosarray *next; int index; - int long_val; + LONG long_val; void *ptr_val; } IOS_BASE_iosarray;
diff --git a/dlls/msvcp90/exception.c b/dlls/msvcp90/exception.c index e5b6018fe31..7f1dfd2188a 100644 --- a/dlls/msvcp90/exception.c +++ b/dlls/msvcp90/exception.c @@ -954,7 +954,7 @@ int __cdecl __uncaught_exceptions(void) typedef struct { EXCEPTION_RECORD *rec; - int *ref; /* not binary compatible with native */ + LONG *ref; /* not binary compatible with native */ } exception_ptr;
/********************************************************************* diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 4aa88e028d6..052305a8a25 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -379,7 +379,7 @@ typedef enum { typedef struct _iosarray { struct _iosarray *next; int index; - int long_val; + LONG long_val; void *ptr_val; } IOS_BASE_iosarray;
diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index e9047ab41b9..1f511c0617b 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -169,7 +169,7 @@ typedef struct cs_queue { struct cs_queue *next; #if _MSVCR_VER >= 110 - BOOL free; + LONG free; int unknown; #endif } cs_queue; @@ -249,7 +249,7 @@ typedef struct thread_wait_entry typedef struct thread_wait { void *signaled; - int pending_waits; + LONG pending_waits; thread_wait_entry entries[1]; } thread_wait;
@@ -263,7 +263,7 @@ typedef struct #if _MSVCR_VER >= 110 typedef struct cv_queue { struct cv_queue *next; - BOOL expired; + LONG expired; } cv_queue;
typedef struct { diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 6617237b055..f3200e046cb 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -1134,7 +1134,7 @@ const char * __thiscall type_info_name_internal_method(type_info * _this, struct typedef struct { EXCEPTION_RECORD *rec; - int *ref; /* not binary compatible with native msvcr100 */ + LONG *ref; /* not binary compatible with native msvcr100 */ } exception_ptr;
#if _MSVCR_VER >= 100 diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index e50f3e6991b..1d965ff8ffc 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -66,7 +66,7 @@ typedef struct __lc_time_data { LCID lcid; #endif int unk; - int refcount; + LONG refcount; #if _MSVCR_VER == 0 || _MSVCR_VER >= 100 union { const wchar_t *wstr[43]; @@ -90,7 +90,7 @@ typedef struct __lc_time_data { } __lc_time_data;
typedef struct threadmbcinfostruct { - int refcount; + LONG refcount; int mbcodepage; int ismbcodepage; int mblcid;
Signed-off-by: Piotr Caban piotr@codeweavers.com
It would be good to change the commit message to something like: msvcr*: Use correct integral types in structs.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/msvcp60/ios.c | 4 ++-- dlls/msvcp90/ios.c | 4 ++-- dlls/msvcp90/locale.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/msvcp60/ios.c b/dlls/msvcp60/ios.c index 495817a54db..9cb78e9dd8e 100644 --- a/dlls/msvcp60/ios.c +++ b/dlls/msvcp60/ios.c @@ -8442,7 +8442,7 @@ basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *t istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf; - num_get_char_get_long(numget, &last, first, last, &base->base, &state, v); + num_get_char_get_long(numget, &last, first, last, &base->base, &state, (LONG*)v); } basic_istream_char_sentry_destroy(this);
@@ -9953,7 +9953,7 @@ static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, in istreambuf_iterator_wchar first={0}, last={0};
first.strbuf = strbuf; - num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v); + num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, (LONG*)v); } basic_istream_wchar_sentry_destroy(this);
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index 21cf33a505c..a4a8657e74f 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -8978,7 +8978,7 @@ basic_istream_char* __thiscall basic_istream_char_read_int(basic_istream_char *t istreambuf_iterator_char first={0}, last={0};
first.strbuf = strbuf; - num_get_char_get_long(numget, &last, first, last, &base->base, &state, v); + num_get_char_get_long(numget, &last, first, last, &base->base, &state, (LONG*)v); } basic_istream_char_sentry_destroy(this);
@@ -10560,7 +10560,7 @@ static basic_istream_wchar* basic_istream_read_int(basic_istream_wchar *this, in istreambuf_iterator_wchar first={0}, last={0};
first.strbuf = strbuf; - num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, v); + num_get_wchar_get_long(numget, &last, first, last, &base->base, &state, (LONG*)v); } basic_istream_wchar_sentry_destroy(this);
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index 116f3c75e5d..dd7fea203eb 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -5931,7 +5931,7 @@ istreambuf_iterator_wchar *__thiscall num_get_wchar_do_get_uint(const num_get *t istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval) { TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return num_get_wchar_do_get_ulong(this, ret, first, last, base, state, pval); + return num_get_wchar_do_get_ulong(this, ret, first, last, base, state, (ULONG*)pval); }
/* ?do_get@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@MBE?AV?$istreambuf_iterator@GU?$char_traits@G@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */ @@ -5941,7 +5941,7 @@ istreambuf_iterator_wchar *__thiscall num_get_short_do_get_uint(const num_get *t istreambuf_iterator_wchar first, istreambuf_iterator_wchar last, ios_base *base, int *state, unsigned int *pval) { TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return num_get_short_do_get_ulong(this, ret, first, last, base, state, pval); + return num_get_short_do_get_ulong(this, ret, first, last, base, state, (ULONG*)pval); }
/* ?get@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */ @@ -6921,7 +6921,7 @@ istreambuf_iterator_char *__thiscall num_get_char_do_get_uint(const num_get *thi istreambuf_iterator_char first, istreambuf_iterator_char last, ios_base *base, int *state, unsigned int *pval) { TRACE("(%p %p %p %p %p)\n", this, ret, base, state, pval); - return num_get_char_do_get_ulong(this, ret, first, last, base, state, pval); + return num_get_char_do_get_ulong(this, ret, first, last, base, state, (ULONG*)pval); }
/* ?get@?$num_get@DV?$istreambuf_iterator@DU?$char_traits@D@std@@@std@@@std@@QBE?AV?$istreambuf_iterator@DU?$char_traits@D@std@@@2@V32@0AAVios_base@2@AAHAAI@Z */
Signed-off-by: Piotr Caban piotr@codeweavers.com
Commit message: msvcp: Use correct integral types.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/msvcrt/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/msvcrt/thread.c b/dlls/msvcrt/thread.c index 173763d0eb1..e71b949a6d5 100644 --- a/dlls/msvcrt/thread.c +++ b/dlls/msvcrt/thread.c @@ -235,7 +235,7 @@ uintptr_t CDECL _beginthreadex( #endif
thread = CreateThread(security, stack_size, _beginthreadex_trampoline, - trampoline, initflag, thrdaddr); + trampoline, initflag, (DWORD *)thrdaddr); if(!thread) { #if _MSVCR_VER >= 140 FreeLibrary(trampoline->module);
Signed-off-by: Piotr Caban piotr@codeweavers.com
Commit message: msvcrt: Add cast to avoid 'long' types warning in _beginthreadex.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/msvcrt/locale.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/dlls/msvcrt/locale.c b/dlls/msvcrt/locale.c index 4c0fce194bd..3b3d027f466 100644 --- a/dlls/msvcrt/locale.c +++ b/dlls/msvcrt/locale.c @@ -429,13 +429,13 @@ static void copy_threadlocinfo_category(pthreadlocinfo locinfo, if(!locinfo->lc_category[category].locale) { locinfo->lc_category[category].locale = old_locinfo->lc_category[category].locale; locinfo->lc_category[category].refcount = old_locinfo->lc_category[category].refcount; - InterlockedIncrement(locinfo->lc_category[category].refcount); + InterlockedIncrement((LONG *)locinfo->lc_category[category].refcount); } #if _MSVCR_VER >= 110 locinfo->lc_name[category] = old_locinfo->lc_name[category]; locinfo->lc_category[category].wrefcount = old_locinfo->lc_category[category].wrefcount; if(locinfo->lc_category[category].wrefcount) - InterlockedIncrement(locinfo->lc_category[category].wrefcount); + InterlockedIncrement((LONG *)locinfo->lc_category[category].wrefcount); #endif }
@@ -560,21 +560,21 @@ static void grab_locinfo(pthreadlocinfo locinfo) { int i;
- InterlockedIncrement(&locinfo->refcount); + InterlockedIncrement((LONG *)&locinfo->refcount); for(i=LC_MIN+1; i<=LC_MAX; i++) { - InterlockedIncrement(locinfo->lc_category[i].refcount); + InterlockedIncrement((LONG *)locinfo->lc_category[i].refcount); if(locinfo->lc_category[i].wrefcount) - InterlockedIncrement(locinfo->lc_category[i].wrefcount); + InterlockedIncrement((LONG *)locinfo->lc_category[i].wrefcount); } if(locinfo->lconv_intl_refcount) - InterlockedIncrement(locinfo->lconv_intl_refcount); + InterlockedIncrement((LONG *)locinfo->lconv_intl_refcount); if(locinfo->lconv_num_refcount) - InterlockedIncrement(locinfo->lconv_num_refcount); + InterlockedIncrement((LONG *)locinfo->lconv_num_refcount); if(locinfo->lconv_mon_refcount) - InterlockedIncrement(locinfo->lconv_mon_refcount); + InterlockedIncrement((LONG *)locinfo->lconv_mon_refcount); if(locinfo->ctype1_refcount) - InterlockedIncrement(locinfo->ctype1_refcount); + InterlockedIncrement((LONG *)locinfo->ctype1_refcount); InterlockedIncrement(&locinfo->lc_time_curr->refcount); }
@@ -1039,12 +1039,12 @@ void free_locinfo(pthreadlocinfo locinfo)
for(i=LC_MIN+1; i<=LC_MAX; i++) { if(!locinfo->lc_category[i].refcount - || !InterlockedDecrement(locinfo->lc_category[i].refcount)) { + || !InterlockedDecrement((LONG *)locinfo->lc_category[i].refcount)) { free(locinfo->lc_category[i].locale); free(locinfo->lc_category[i].refcount); } if(!locinfo->lc_category[i].wrefcount - || !InterlockedDecrement(locinfo->lc_category[i].wrefcount)) { + || !InterlockedDecrement((LONG *)locinfo->lc_category[i].wrefcount)) { #if _MSVCR_VER >= 110 free(locinfo->lc_name[i]); #endif @@ -1053,7 +1053,7 @@ void free_locinfo(pthreadlocinfo locinfo) }
if(locinfo->lconv_num_refcount - && !InterlockedDecrement(locinfo->lconv_num_refcount)) { + && !InterlockedDecrement((LONG *)locinfo->lconv_num_refcount)) { free(locinfo->lconv->decimal_point); free(locinfo->lconv->thousands_sep); free(locinfo->lconv->grouping); @@ -1064,7 +1064,7 @@ void free_locinfo(pthreadlocinfo locinfo) free(locinfo->lconv_num_refcount); } if(locinfo->lconv_mon_refcount - && !InterlockedDecrement(locinfo->lconv_mon_refcount)) { + && !InterlockedDecrement((LONG *)locinfo->lconv_mon_refcount)) { free(locinfo->lconv->int_curr_symbol); free(locinfo->lconv->currency_symbol); free(locinfo->lconv->mon_decimal_point); @@ -1083,13 +1083,13 @@ void free_locinfo(pthreadlocinfo locinfo) free(locinfo->lconv_mon_refcount); } if(locinfo->lconv_intl_refcount - && !InterlockedDecrement(locinfo->lconv_intl_refcount)) { + && !InterlockedDecrement((LONG *)locinfo->lconv_intl_refcount)) { free(locinfo->lconv_intl_refcount); free(locinfo->lconv); }
if(locinfo->ctype1_refcount - && !InterlockedDecrement(locinfo->ctype1_refcount)) { + && !InterlockedDecrement((LONG *)locinfo->ctype1_refcount)) { free(locinfo->ctype1_refcount); free(locinfo->ctype1); free((void*)locinfo->pclmap); @@ -1100,7 +1100,7 @@ void free_locinfo(pthreadlocinfo locinfo) && locinfo->lc_time_curr != &cloc_time_data) free(locinfo->lc_time_curr);
- if(InterlockedDecrement(&locinfo->refcount)) + if(InterlockedDecrement((LONG *)&locinfo->refcount)) return;
free(locinfo); @@ -1398,7 +1398,7 @@ static pthreadlocinfo create_locinfo(int category, locinfo->pclmap = old_locinfo->pclmap; locinfo->pcumap = old_locinfo->pcumap; if(locinfo->ctype1_refcount) - InterlockedIncrement(locinfo->ctype1_refcount); + InterlockedIncrement((LONG *)locinfo->ctype1_refcount); } else if(lcid[LC_CTYPE]) { CPINFO cp_info; int j; @@ -1480,7 +1480,7 @@ static pthreadlocinfo create_locinfo(int category, locinfo->lconv = old_locinfo->lconv; locinfo->lconv_intl_refcount = old_locinfo->lconv_intl_refcount; if(locinfo->lconv_intl_refcount) - InterlockedIncrement(locinfo->lconv_intl_refcount); + InterlockedIncrement((LONG *)locinfo->lconv_intl_refcount); } else if(lcid[LC_MONETARY] || lcid[LC_NUMERIC]) { locinfo->lconv = malloc(sizeof(struct lconv)); locinfo->lconv_intl_refcount = malloc(sizeof(int)); @@ -1510,7 +1510,7 @@ static pthreadlocinfo create_locinfo(int category, copy_threadlocinfo_category(locinfo, old_locinfo, LC_MONETARY); locinfo->lconv_mon_refcount = old_locinfo->lconv_mon_refcount; if(locinfo->lconv_mon_refcount) - InterlockedIncrement(locinfo->lconv_mon_refcount); + InterlockedIncrement((LONG *)locinfo->lconv_mon_refcount); if(locinfo->lconv != &cloc_lconv && locinfo->lconv != old_locinfo->lconv) { locinfo->lconv->int_curr_symbol = old_locinfo->lconv->int_curr_symbol; locinfo->lconv->currency_symbol = old_locinfo->lconv->currency_symbol; @@ -1785,7 +1785,7 @@ static pthreadlocinfo create_locinfo(int category, copy_threadlocinfo_category(locinfo, old_locinfo, LC_NUMERIC); locinfo->lconv_num_refcount = old_locinfo->lconv_num_refcount; if(locinfo->lconv_num_refcount) - InterlockedIncrement(locinfo->lconv_num_refcount); + InterlockedIncrement((LONG *)locinfo->lconv_num_refcount); if(locinfo->lconv != &cloc_lconv && locinfo->lconv != old_locinfo->lconv) { locinfo->lconv->decimal_point = old_locinfo->lconv->decimal_point; locinfo->lconv->thousands_sep = old_locinfo->lconv->thousands_sep;
Signed-off-by: Piotr Caban piotr@codeweavers.com
Commit message: msvcrt: Add casts to avoid 'long' types warning in locale functions.