https://git.reactos.org/?p=reactos.git;a=commitdiff;h=36bf55494295a147add92…
commit 36bf55494295a147add926190fca19326d55cd92
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Mon Mar 14 21:20:24 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:44 2022 +0100
[WINESYNC] msi: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 337d7911bfb83b0e775a34c96b67b4e67c1fa871 by Eric Pouech
<eric.pouech(a)gmail.com>
---
dll/win32/msi/action.c | 5 +++--
dll/win32/msi/appsearch.c | 6 ++++--
dll/win32/msi/assembly.c | 4 ++--
dll/win32/msi/custom.c | 4 ++--
dll/win32/msi/database.c | 3 ++-
dll/win32/msi/files.c | 5 +++--
dll/win32/msi/msi.c | 3 ++-
dll/win32/msi/storages.c | 3 ++-
dll/win32/msi/streams.c | 6 ++++--
dll/win32/msi/suminfo.c | 7 ++++---
dll/win32/msi/table.c | 16 ++++++++++------
11 files changed, 38 insertions(+), 24 deletions(-)
diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c
index 98e503694ba..b3bfa26bea7 100644
--- a/dll/win32/msi/action.c
+++ b/dll/win32/msi/action.c
@@ -1960,7 +1960,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)
@@ -7220,7 +7220,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/dll/win32/msi/appsearch.c b/dll/win32/msi/appsearch.c
index abd3c9d3fd9..d3a8ccc03f3 100644
--- a/dll/win32/msi/appsearch.c
+++ b/dll/win32/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/dll/win32/msi/assembly.c b/dll/win32/msi/assembly.c
index 1007979827a..9cddfd2e68d 100644
--- a/dll/win32/msi/assembly.c
+++ b/dll/win32/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/dll/win32/msi/custom.c b/dll/win32/msi/custom.c
index 3ee4f82e41f..e33acad3005 100644
--- a/dll/win32/msi/custom.c
+++ b/dll/win32/msi/custom.c
@@ -219,7 +219,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)
@@ -669,7 +669,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/dll/win32/msi/database.c b/dll/win32/msi/database.c
index c84fd1f6440..dd5a6977460 100644
--- a/dll/win32/msi/database.c
+++ b/dll/win32/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/dll/win32/msi/files.c b/dll/win32/msi/files.c
index 61694ee19ae..8cb876b2468 100644
--- a/dll/win32/msi/files.c
+++ b/dll/win32/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/dll/win32/msi/msi.c b/dll/win32/msi/msi.c
index 960624c0d79..a9e0fbeeda6 100644
--- a/dll/win32/msi/msi.c
+++ b/dll/win32/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/dll/win32/msi/storages.c b/dll/win32/msi/storages.c
index 336b40a3ae1..8262f601693 100644
--- a/dll/win32/msi/storages.c
+++ b/dll/win32/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/dll/win32/msi/streams.c b/dll/win32/msi/streams.c
index 8f6986039a9..53698f32872 100644
--- a/dll/win32/msi/streams.c
+++ b/dll/win32/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/dll/win32/msi/suminfo.c b/dll/win32/msi/suminfo.c
index cd65d68f0eb..2337ac2bbdf 100644
--- a/dll/win32/msi/suminfo.c
+++ b/dll/win32/msi/suminfo.c
@@ -1124,12 +1124,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;
@@ -1267,7 +1267,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/dll/win32/msi/table.c b/dll/win32/msi/table.c
index bfddd6125e9..abffe75a1c9 100644
--- a/dll/win32/msi/table.c
+++ b/dll/win32/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);