MSI: fix warnings found with -Wsign-compare
Mike McCormack
mike at codeweavers.com
Thu Aug 5 03:01:45 CDT 2004
ChangeLog:
* fix warnings found with -Wsign-compare
-------------- next part --------------
Index: dlls/msi/action.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.c,v
retrieving revision 1.33
diff -u -r1.33 action.c
--- dlls/msi/action.c 30 Jul 2004 00:00:25 -0000 1.33
+++ dlls/msi/action.c 5 Aug 2004 06:38:58 -0000
@@ -158,7 +158,7 @@
static UINT resolve_folder(MSIPACKAGE *package, LPCWSTR name, LPWSTR path,
BOOL source, BOOL set_prop, MSIFOLDER **folder);
-static UINT track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path);
+static int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path);
/*
* consts and values used
@@ -264,8 +264,8 @@
inline static int get_loaded_component(MSIPACKAGE* package, LPCWSTR Component )
{
- INT rc = -1;
- INT i;
+ int rc = -1;
+ DWORD i;
for (i = 0; i < package->loaded_components; i++)
{
@@ -280,8 +280,8 @@
inline static int get_loaded_feature(MSIPACKAGE* package, LPCWSTR Feature )
{
- INT rc = -1;
- INT i;
+ int rc = -1;
+ DWORD i;
for (i = 0; i < package->loaded_features; i++)
{
@@ -296,8 +296,8 @@
inline static int get_loaded_file(MSIPACKAGE* package, LPCWSTR file)
{
- INT rc = -1;
- INT i;
+ int rc = -1;
+ DWORD i;
for (i = 0; i < package->loaded_files; i++)
{
@@ -310,10 +310,10 @@
return rc;
}
-static UINT track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path)
+static int track_tempfile(MSIPACKAGE *package, LPCWSTR name, LPCWSTR path)
{
- int i;
- int index;
+ DWORD i;
+ DWORD index;
if (!package)
return -2;
@@ -343,7 +343,7 @@
void ACTION_remove_tracked_tempfiles(MSIPACKAGE* package)
{
- int i;
+ DWORD i;
if (!package)
return;
@@ -1625,10 +1625,10 @@
return ERROR_SUCCESS;
}
-static int load_file(MSIPACKAGE* package, MSIRECORD * row)
+static UINT load_file(MSIPACKAGE* package, MSIRECORD * row)
{
- int index = package->loaded_files;
- int i;
+ DWORD index = package->loaded_files;
+ DWORD i;
WCHAR buffer[0x100];
DWORD sz;
@@ -1745,7 +1745,8 @@
WCHAR parent[0x100];
DWORD sz=0x100;
MSIRECORD * row = 0;
- INT i,index = -1;
+ INT index = -1;
+ DWORD i;
TRACE("Looking for dir %s\n",debugstr_w(dir));
@@ -1753,7 +1754,7 @@
{
if (strcmpW(package->folders[i].Directory,dir)==0)
{
- TRACE(" %s retuning on index %i\n",debugstr_w(dir),i);
+ TRACE(" %s retuning on index %lu\n",debugstr_w(dir),i);
return i;
}
}
@@ -1877,7 +1878,7 @@
static UINT resolve_folder(MSIPACKAGE *package, LPCWSTR name, LPWSTR path,
BOOL source, BOOL set_prop, MSIFOLDER **folder)
{
- INT i;
+ DWORD i;
UINT rc = ERROR_SUCCESS;
DWORD sz;
@@ -2012,7 +2013,7 @@
static const WCHAR szOne[] = { '1', 0 };
UINT rc;
MSIQUERY * view;
- INT i;
+ DWORD i;
TRACE("Building Directory properties\n");
@@ -2345,11 +2346,11 @@
WCHAR cab[0x100];
DWORD sz=0x100;
INT seq;
- static INT last_sequence = 0;
+ static UINT last_sequence = 0;
if (sequence <= last_sequence)
{
- TRACE("Media already ready (%i, %i)\n",sequence,last_sequence);
+ TRACE("Media already ready (%u, %u)\n",sequence,last_sequence);
return ERROR_SUCCESS;
}
@@ -2441,7 +2442,7 @@
static UINT ACTION_InstallFiles(MSIPACKAGE *package)
{
UINT rc = ERROR_SUCCESS;
- INT index;
+ DWORD index;
MSIRECORD * uirow;
WCHAR uipath[MAX_PATH];
@@ -2523,7 +2524,7 @@
inline static UINT get_file_target(MSIPACKAGE *package, LPCWSTR file_key,
LPWSTR file_source)
{
- INT index;
+ DWORD index;
if (!package)
return ERROR_INVALID_HANDLE;
@@ -3000,7 +3001,8 @@
WCHAR level[10000];
INT install_level;
DWORD sz;
- INT i,j;
+ DWORD i;
+ INT j;
DWORD rc;
LPWSTR override = NULL;
static const WCHAR addlocal[]={'A','D','D','L','O','C','A','L',0};
@@ -3200,7 +3202,7 @@
WCHAR squished_cc[0x100];
DWORD sz;
UINT rc;
- INT i;
+ DWORD i;
HKEY hkey=0,hkey2=0,hkey3=0;
static const WCHAR szProductCode[]=
{'P','r','o','d','u','c','t','C','o','d','e',0};
@@ -4377,7 +4379,7 @@
UINT MSI_SetTargetPathW(MSIPACKAGE *package, LPCWSTR szFolder,
LPCWSTR szFolderPath)
{
- INT i;
+ DWORD i;
WCHAR path[MAX_PATH];
MSIFOLDER *folder;
Index: dlls/msi/string.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/string.c,v
retrieving revision 1.11
diff -u -r1.11 string.c
--- dlls/msi/string.c 29 Jul 2004 23:59:15 -0000 1.11
+++ dlls/msi/string.c 5 Aug 2004 06:38:58 -0000
@@ -52,9 +52,9 @@
msistring *strings; /* an array of strings (in the tree) */
};
-static int msistring_makehash( const WCHAR *str )
+static UINT msistring_makehash( const WCHAR *str )
{
- int hash = 0;
+ UINT hash = 0;
if (str==NULL)
return hash;
@@ -106,7 +106,7 @@
static int st_find_free_entry( string_table *st )
{
- int i, sz;
+ UINT i, sz;
msistring *p;
TRACE("%p\n", st);
@@ -135,7 +135,7 @@
return st->freeslot;
}
-static void st_mark_entry_used( string_table *st, int n )
+static void st_mark_entry_used( string_table *st, UINT n )
{
if( n >= st->maxcount )
return;
@@ -351,7 +351,7 @@
*/
UINT msi_string2idW( string_table *st, LPCWSTR str, UINT *id )
{
- int hash;
+ UINT hash;
UINT i, r = ERROR_INVALID_PARAMETER;
hash = msistring_makehash( str );
Index: dlls/msi/tokenize.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/tokenize.c,v
retrieving revision 1.7
diff -u -r1.7 tokenize.c
--- dlls/msi/tokenize.c 30 Jun 2004 18:18:27 -0000 1.7
+++ dlls/msi/tokenize.c 5 Aug 2004 06:38:58 -0000
@@ -159,7 +159,7 @@
** returned. If the input is not a keyword, TK_ID is returned.
*/
int sqliteKeywordCode(const WCHAR *z, int n){
- int i, len;
+ UINT i, len;
char buffer[0x10];
len = WideCharToMultiByte( CP_ACP, 0, z, n, buffer, sizeof buffer, NULL, NULL );
More information about the wine-patches
mailing list