Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/concrt140/details.c | 2 +- dlls/msvcp90/details.c | 2 +- dlls/msvcrt/concurrency.c | 4 ++-- dlls/msvcrt/file.c | 8 ++++---- dlls/msvcrt/heap.c | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/concrt140/details.c b/dlls/concrt140/details.c index 59345c52871..72bb744744c 100644 --- a/dlls/concrt140/details.c +++ b/dlls/concrt140/details.c @@ -371,7 +371,7 @@ void __thiscall _Concurrent_queue_base_v4_dummy(_Concurrent_queue_base_v4 *this)
DEFINE_RTTI_DATA0(_Concurrent_queue_base_v4, 0, ".?AV_Concurrent_queue_base_v4@details@Concurrency@@")
-static int _Runtime_object_id; +static LONG _Runtime_object_id;
typedef struct { diff --git a/dlls/msvcp90/details.c b/dlls/msvcp90/details.c index 6b54ea9597f..d63a47667f9 100644 --- a/dlls/msvcp90/details.c +++ b/dlls/msvcp90/details.c @@ -385,7 +385,7 @@ void __thiscall _Concurrent_queue_base_v4_dummy(_Concurrent_queue_base_v4 *this)
DEFINE_RTTI_DATA0(_Concurrent_queue_base_v4, 0, ".?AV_Concurrent_queue_base_v4@details@Concurrency@@")
-static int _Runtime_object_id; +static LONG _Runtime_object_id;
typedef struct { diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 0a393cd0004..6afe6e81489 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -34,8 +34,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt); typedef exception cexception; CREATE_EXCEPTION_OBJECT(cexception)
-static int context_id = -1; -static int scheduler_id = -1; +static LONG context_id = -1; +static LONG scheduler_id = -1;
typedef enum { SchedulerKind, diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 2b0395d7535..2666492956c 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -144,8 +144,8 @@ static int MSVCRT_max_streams = 512, MSVCRT_stream_idx; static int MSVCRT_umask = 0;
/* INTERNAL: static data for tmpnam and _wtmpname functions */ -static int tmpnam_unique; -static int tmpnam_s_unique; +static LONG tmpnam_unique; +static LONG tmpnam_s_unique;
static const unsigned int EXE = 'e' << 16 | 'x' << 8 | 'e'; static const unsigned int BAT = 'b' << 16 | 'a' << 8 | 't'; @@ -4935,7 +4935,7 @@ void CDECL setbuf(FILE* file, char *buf) setvbuf(file, buf, buf ? _IOFBF : _IONBF, BUFSIZ); }
-static int tmpnam_helper(char *s, size_t size, int *tmpnam_unique, int tmp_max) +static int tmpnam_helper(char *s, size_t size, LONG *tmpnam_unique, int tmp_max) { char tmpstr[8]; char *p = s; @@ -5006,7 +5006,7 @@ char * CDECL tmpnam(char *s) return tmpnam_helper(s, -1, &tmpnam_unique, TMP_MAX) ? NULL : s; }
-static int wtmpnam_helper(wchar_t *s, size_t size, int *tmpnam_unique, int tmp_max) +static int wtmpnam_helper(wchar_t *s, size_t size, LONG *tmpnam_unique, int tmp_max) { wchar_t tmpstr[8]; wchar_t *p = s; diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 429a9e2ecda..049c4e0cd93 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -46,7 +46,7 @@ static HANDLE heap, sb_heap; typedef int (CDECL *MSVCRT_new_handler_func)(size_t size);
static MSVCRT_new_handler_func MSVCRT_new_handler; -static int MSVCRT_new_mode; +static LONG MSVCRT_new_mode;
/* FIXME - According to documentation it should be 8*1024, at runtime it returns 16 */ static unsigned int MSVCRT_amblksiz = 16;
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/msvcrt/math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index b13a4e03fd1..33afe8d1d90 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -10314,7 +10314,7 @@ double CDECL _except1(DWORD fpe, _FP_OPERATION_CODE op, double arg, double res, { ULONG_PTR exception_arg; DWORD exception = 0; - DWORD fpword = 0; + unsigned int fpword = 0; WORD operation; int raise = 0;
Signed-off-by: Piotr Caban piotr@codeweavers.com
Commit message: msvcrt: Use correct integral type in _except1.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/msi/action.c | 5 +++-- dlls/msi/appsearch.c | 6 ++++-- dlls/msi/assembly.c | 4 ++-- dlls/msi/custom.c | 4 ++-- dlls/msi/database.c | 3 ++- dlls/msi/files.c | 5 +++-- dlls/msi/msi.c | 3 ++- dlls/msi/storages.c | 3 ++- dlls/msi/streams.c | 6 ++++-- dlls/msi/suminfo.c | 7 ++++--- dlls/msi/table.c | 16 ++++++++++------ 11 files changed, 38 insertions(+), 24 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 8ee9420af55..a1b4eba0b8a 100644 --- a/dlls/msi/action.c +++ b/dlls/msi/action.c @@ -1953,7 +1953,7 @@ static WCHAR *create_temp_dir( MSIDATABASE *db ) if (!db->tempfolder) { WCHAR tmp[MAX_PATH]; - UINT len = ARRAY_SIZE( tmp ); + DWORD len = ARRAY_SIZE( tmp );
if (msi_get_property( db, L"TempFolder", tmp, &len ) || GetFileAttributesW( tmp ) != FILE_ATTRIBUTE_DIRECTORY) @@ -7188,7 +7188,8 @@ static UINT ACTION_InstallAdminPackage( MSIPACKAGE *package ) static UINT ACTION_SetODBCFolders( MSIPACKAGE *package ) { MSIQUERY *view; - UINT r, count; + UINT r; + DWORD count;
r = MSI_DatabaseOpenViewW( package->db, L"SELECT * FROM `ODBCDriver`", &view ); if (r == ERROR_SUCCESS) diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c index abd3c9d3fd9..d3a8ccc03f3 100644 --- a/dlls/msi/appsearch.c +++ b/dlls/msi/appsearch.c @@ -157,7 +157,8 @@ static void free_signature( MSISIGNATURE *sig ) static WCHAR *search_file( MSIPACKAGE *package, WCHAR *path, MSISIGNATURE *sig ) { VS_FIXEDFILEINFO *info; - DWORD attr, size; + DWORD attr; + UINT size; LPWSTR val = NULL; LPBYTE buffer;
@@ -622,7 +623,8 @@ static BOOL match_languages( const void *version, const WCHAR *languages ) USHORT id; USHORT codepage; } *lang; - DWORD len, num_ids, i, j; + UINT len, j; + DWORD num_ids, i; BOOL found = FALSE; LANGID *ids;
diff --git a/dlls/msi/assembly.c b/dlls/msi/assembly.c index 1007979827a..9cddfd2e68d 100644 --- a/dlls/msi/assembly.c +++ b/dlls/msi/assembly.c @@ -152,7 +152,7 @@ static MSIRECORD *get_assembly_record( MSIPACKAGE *package, const WCHAR *comp )
struct assembly_name { - UINT count; + DWORD count; UINT index; WCHAR **attrs; }; @@ -268,7 +268,7 @@ IAssemblyEnum *msi_create_assembly_enum( MSIPACKAGE *package, const WCHAR *displ IAssemblyName *name; IAssemblyEnum *ret; WCHAR *str; - UINT len = 0; + DWORD len = 0;
if (!package->pCreateAssemblyNameObject || !package->pCreateAssemblyEnum) return NULL;
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 94c159c6a2a..2f2eedebc31 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -212,7 +212,7 @@ WCHAR *msi_create_temp_file( MSIDATABASE *db ) if (!db->tempfolder) { WCHAR tmp[MAX_PATH]; - UINT len = ARRAY_SIZE( tmp ); + DWORD len = ARRAY_SIZE( tmp );
if (msi_get_property( db, L"TempFolder", tmp, &len ) || GetFileAttributesW( tmp ) != FILE_ATTRIBUTE_DIRECTORY) @@ -648,7 +648,7 @@ static DWORD WINAPI custom_client_thread(void *arg) HANDLE thread; HANDLE pipe; DWORD size; - UINT rc; + DWORD rc;
CoInitializeEx(NULL, COINIT_MULTITHREADED); /* needed to marshal streams */
diff --git a/dlls/msi/database.c b/dlls/msi/database.c index c84fd1f6440..dd5a6977460 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -1362,7 +1362,8 @@ static LPWSTR get_key_value(MSIQUERY *view, LPCWSTR key, MSIRECORD *rec) { MSIRECORD *colnames; LPWSTR str, val; - UINT r, i = 0, sz = 0; + UINT r, i = 0; + DWORD sz = 0; int cmp;
r = MSI_ViewGetColumnInfo(view, MSICOLINFO_NAMES, &colnames); diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 61694ee19ae..8cb876b2468 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -161,7 +161,8 @@ DWORD msi_get_file_version_info( MSIPACKAGE *package, const WCHAR *path, DWORD b VS_FIXEDFILEINFO *msi_get_disk_file_version( MSIPACKAGE *package, const WCHAR *filename ) { VS_FIXEDFILEINFO *ptr, *ret; - DWORD version_size, size; + DWORD version_size; + UINT size; void *version;
if (!(version_size = msi_get_file_version_info( package, filename, 0, NULL ))) return NULL; @@ -742,7 +743,7 @@ static UINT patch_assembly( MSIPACKAGE *package, MSIASSEMBLY *assembly, MSIFILEP while ((IAssemblyEnum_GetNextAssembly( iter, NULL, &name, 0 ) == S_OK)) { WCHAR *displayname, *path; - UINT len = 0; + DWORD len = 0; HRESULT hr;
hr = IAssemblyName_GetDisplayName( name, NULL, &len, 0 ); diff --git a/dlls/msi/msi.c b/dlls/msi/msi.c index c4c787da4e4..e91959e69f7 100644 --- a/dlls/msi/msi.c +++ b/dlls/msi/msi.c @@ -3167,7 +3167,8 @@ static UINT get_file_version( const WCHAR *path, WCHAR *verbuf, DWORD *verlen, WCHAR *langbuf, DWORD *langlen ) { UINT ret = ERROR_MORE_DATA; - DWORD len, error; + UINT len; + DWORD error; LPVOID version; VS_FIXEDFILEINFO *ffi; USHORT *lang; diff --git a/dlls/msi/storages.c b/dlls/msi/storages.c index 336b40a3ae1..8262f601693 100644 --- a/dlls/msi/storages.c +++ b/dlls/msi/storages.c @@ -466,7 +466,8 @@ static INT add_storages_to_table(MSISTORAGESVIEW *sv) IEnumSTATSTG *stgenum = NULL; STATSTG stat; HRESULT hr; - UINT count = 0, size; + UINT count = 0; + ULONG size;
hr = IStorage_EnumElements(sv->db->storage, 0, NULL, 0, &stgenum); if (FAILED(hr)) diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c index 8f6986039a9..53698f32872 100644 --- a/dlls/msi/streams.c +++ b/dlls/msi/streams.c @@ -448,7 +448,8 @@ static UINT load_streams( MSIDATABASE *db ) IEnumSTATSTG *stgenum; STATSTG stat; HRESULT hr; - UINT count, r = ERROR_SUCCESS; + ULONG count; + UINT r = ERROR_SUCCESS; IStream *stream;
hr = IStorage_EnumElements( db->storage, 0, NULL, 0, &stgenum ); @@ -564,7 +565,8 @@ static HRESULT write_stream( IStream *dst, IStream *src ) char buf[4096]; STATSTG stat; LARGE_INTEGER pos; - UINT count, size; + ULONG count; + UINT size;
hr = IStream_Stat( src, &stat, STATFLAG_NONAME ); if (FAILED( hr )) return hr; diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c index 82463be73cc..c0e1e3151ca 100644 --- a/dlls/msi/suminfo.c +++ b/dlls/msi/suminfo.c @@ -1103,12 +1103,12 @@ static UINT save_prop( MSISUMMARYINFO *si, HANDLE handle, UINT row ) static const char fmt_begin[] = "%u\t"; static const char data_end[] = "\r\n"; static const char fmt_int[] = "%u"; - UINT r, data_type, len; + UINT r, data_type; SYSTEMTIME system_time; FILETIME file_time; INT int_value; awstring str; - DWORD sz; + DWORD len, sz;
str.unicode = FALSE; str.str.a = NULL; @@ -1246,7 +1246,8 @@ UINT msi_load_suminfo_properties( MSIPACKAGE *package ) { MSISUMMARYINFO *si; WCHAR *package_code; - UINT r, len; + UINT r; + DWORD len; awstring str; INT count;
diff --git a/dlls/msi/table.c b/dlls/msi/table.c index bfddd6125e9..abffe75a1c9 100644 --- a/dlls/msi/table.c +++ b/dlls/msi/table.c @@ -66,7 +66,7 @@ struct tagMSITABLE MSICOLUMNINFO *colinfo; UINT col_count; MSICONDITION persistent; - INT ref_count; + LONG ref_count; WCHAR name[1]; };
@@ -2261,9 +2261,10 @@ static WCHAR* create_key_string(MSITABLEVIEW *tv, MSIRECORD *rec) return key; }
-static UINT msi_record_stream_name( const MSITABLEVIEW *tv, MSIRECORD *rec, LPWSTR name, UINT *len ) +static UINT msi_record_stream_name( const MSITABLEVIEW *tv, MSIRECORD *rec, LPWSTR name, DWORD *len ) { - UINT p = 0, l, i, r; + UINT p = 0, i, r; + DWORD l;
l = wcslen( tv->name ); if (name && *len > l) @@ -2327,7 +2328,8 @@ static UINT TransformView_set_row( MSIVIEW *view, UINT row, MSIRECORD *rec, UINT MSIRECORD *old_rec; MSIQUERY *q; WCHAR *key; - UINT i, p, r, len, qlen; + UINT i, p, r, qlen; + DWORD len;
if (!wcscmp( tv->name, L"_Columns" )) { @@ -2503,7 +2505,8 @@ static UINT TransformView_add_column( MSITABLEVIEW *tv, MSIRECORD *rec ) L"INSERT INTO `_TransformView` (`new`, `Table`, `Current`, `Column`, `Data`) VALUES (1, '";
WCHAR buf[256], *query = buf; - UINT i, p, len, r, qlen; + UINT i, p, r, qlen; + DWORD len; MSIQUERY *q;
qlen = p = wcslen( query_pfx ); @@ -2946,7 +2949,8 @@ static UINT read_raw_int(const BYTE *data, UINT col, UINT bytes)
static UINT msi_record_encoded_stream_name( const MSITABLEVIEW *tv, MSIRECORD *rec, LPWSTR *pstname ) { - UINT r, len; + UINT r; + DWORD len; WCHAR *name;
TRACE("%p %p\n", tv, rec);
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/vcomp/main.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index 14c3546cb5a..c4f2572c86a 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -626,78 +626,78 @@ void CDECL _vcomp_reduction_i2(unsigned int flags, short *dest, short val)
void CDECL _vcomp_atomic_add_i4(int *dest, int val) { - InterlockedExchangeAdd(dest, val); + InterlockedExchangeAdd((LONG *)dest, val); }
void CDECL _vcomp_atomic_and_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old & val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old & val, old) != old); }
void CDECL _vcomp_atomic_div_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old / val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old / val, old) != old); }
void CDECL _vcomp_atomic_div_ui4(unsigned int *dest, unsigned int val) { unsigned int old; - do old = *dest; while (InterlockedCompareExchange((int *)dest, old / val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old / val, old) != old); }
void CDECL _vcomp_atomic_mul_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old * val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old * val, old) != old); }
void CDECL _vcomp_atomic_or_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old | val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old | val, old) != old); }
void CDECL _vcomp_atomic_shl_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old << val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old << val, old) != old); }
void CDECL _vcomp_atomic_shr_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old >> val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old >> val, old) != old); }
void CDECL _vcomp_atomic_shr_ui4(unsigned int *dest, unsigned int val) { unsigned int old; - do old = *dest; while (InterlockedCompareExchange((int *)dest, old >> val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old >> val, old) != old); }
void CDECL _vcomp_atomic_sub_i4(int *dest, int val) { - InterlockedExchangeAdd(dest, -val); + InterlockedExchangeAdd((LONG *)dest, -val); }
void CDECL _vcomp_atomic_xor_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old ^ val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old ^ val, old) != old); }
static void CDECL _vcomp_atomic_bool_and_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old && val, old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old && val, old) != old); }
static void CDECL _vcomp_atomic_bool_or_i4(int *dest, int val) { int old; - do old = *dest; while (InterlockedCompareExchange(dest, old ? old : (val != 0), old) != old); + do old = *dest; while (InterlockedCompareExchange((LONG *)dest, old ? old : (val != 0), old) != old); }
void CDECL _vcomp_reduction_i4(unsigned int flags, int *dest, int val) @@ -822,7 +822,7 @@ void CDECL _vcomp_atomic_add_r4(float *dest, float val) old = *(int *)dest; *(float *)&new = *(float *)&old + val; } - while (InterlockedCompareExchange((int *)dest, new, old) != old); + while (InterlockedCompareExchange((LONG *)dest, new, old) != old); }
void CDECL _vcomp_atomic_div_r4(float *dest, float val) @@ -833,7 +833,7 @@ void CDECL _vcomp_atomic_div_r4(float *dest, float val) old = *(int *)dest; *(float *)&new = *(float *)&old / val; } - while (InterlockedCompareExchange((int *)dest, new, old) != old); + while (InterlockedCompareExchange((LONG *)dest, new, old) != old); }
void CDECL _vcomp_atomic_mul_r4(float *dest, float val) @@ -844,7 +844,7 @@ void CDECL _vcomp_atomic_mul_r4(float *dest, float val) old = *(int *)dest; *(float *)&new = *(float *)&old * val; } - while (InterlockedCompareExchange((int *)dest, new, old) != old); + while (InterlockedCompareExchange((LONG *)dest, new, old) != old); }
void CDECL _vcomp_atomic_sub_r4(float *dest, float val) @@ -855,7 +855,7 @@ void CDECL _vcomp_atomic_sub_r4(float *dest, float val) old = *(int *)dest; *(float *)&new = *(float *)&old - val; } - while (InterlockedCompareExchange((int *)dest, new, old) != old); + while (InterlockedCompareExchange((LONG *)dest, new, old) != old); }
static void CDECL _vcomp_atomic_bool_and_r4(float *dest, float val) @@ -866,7 +866,7 @@ static void CDECL _vcomp_atomic_bool_and_r4(float *dest, float val) old = *(int *)dest; *(float *)&new = (*(float *)&old != 0.0) ? (val != 0.0) : 0.0; } - while (InterlockedCompareExchange((int *)dest, new, old) != old); + while (InterlockedCompareExchange((LONG *)dest, new, old) != old); }
static void CDECL _vcomp_atomic_bool_or_r4(float *dest, float val) @@ -877,7 +877,7 @@ static void CDECL _vcomp_atomic_bool_or_r4(float *dest, float val) old = *(int *)dest; *(float *)&new = (*(float *)&old != 0.0) ? *(float *)&old : (val != 0.0); } - while (InterlockedCompareExchange((int *)dest, new, old) != old); + while (InterlockedCompareExchange((LONG *)dest, new, old) != old); }
void CDECL _vcomp_reduction_r4(unsigned int flags, float *dest, float val) @@ -1850,7 +1850,7 @@ static void CDECL c2vectparallel_wrapper(int start, int end, int step, int end_i curr_end -= step; }
- if ((new_start = InterlockedCompareExchange(dynamic_start, next_start, start)) != start) + if ((new_start = InterlockedCompareExchange((LONG volatile*)dynamic_start, next_start, start)) != start) { start = new_start; continue;
Signed-off-by: Piotr Caban piotr@codeweavers.com
Commit message: msvcr*: Use correct integral type in Interlocked* calls.