Andrew Talbot : msi: Avoid signed-unsigned integer comparisons.

Alexandre Julliard julliard at winehq.org
Mon Feb 18 13:27:05 CST 2013


Module: wine
Branch: master
Commit: 40f3a9fa590b1e4ab785509bb389efbe4f59e964
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=40f3a9fa590b1e4ab785509bb389efbe4f59e964

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Sat Feb 16 21:09:17 2013 +0000

msi: Avoid signed-unsigned integer comparisons.

---

 dlls/msi/package.c |    8 +++++---
 dlls/msi/suminfo.c |    2 +-
 dlls/msi/where.c   |    4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 385000c..bcda102 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -154,7 +154,6 @@ void msi_free_action_script( MSIPACKAGE *package, UINT script )
 
 static void free_package_structures( MSIPACKAGE *package )
 {
-    INT i;
     struct list *item, *cursor;
 
     LIST_FOR_EACH_SAFE( item, cursor, &package->features )
@@ -283,11 +282,14 @@ static void free_package_structures( MSIPACKAGE *package )
 
     if (package->script)
     {
+        INT i;
+        UINT j;
+
         for (i = 0; i < SCRIPT_MAX; i++)
             msi_free_action_script( package, i );
 
-        for (i = 0; i < package->script->UniqueActionsCount; i++)
-            msi_free( package->script->UniqueActions[i] );
+        for (j = 0; j < package->script->UniqueActionsCount; j++)
+            msi_free( package->script->UniqueActions[j] );
 
         msi_free( package->script->UniqueActions );
         msi_free( package->script );
diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c
index e0c99b8..363f683 100644
--- a/dlls/msi/suminfo.c
+++ b/dlls/msi/suminfo.c
@@ -922,7 +922,7 @@ static UINT parse_prop( LPCWSTR prop, LPCWSTR value, UINT *pid, INT *int_value,
 UINT msi_add_suminfo( MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns )
 {
     UINT r = ERROR_FUNCTION_FAILED;
-    DWORD i, j;
+    int i, j;
     MSISUMMARYINFO *si;
 
     si = MSI_GetSummaryInformationW( db->storage, num_records * (num_columns / 2) );
diff --git a/dlls/msi/where.c b/dlls/msi/where.c
index 10c4b37..e3bc9b7 100644
--- a/dlls/msi/where.c
+++ b/dlls/msi/where.c
@@ -770,7 +770,7 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record )
     JOINTABLE *table = wv->tables;
     UINT *rows;
     JOINTABLE **ordered_tables;
-    int i = 0;
+    UINT i = 0;
 
     TRACE("%p %p\n", wv, record);
 
@@ -1052,7 +1052,7 @@ static UINT WHERE_sort(struct tagMSIVIEW *view, column_info *columns)
     column_info *column = columns;
     MSIORDERINFO *orderinfo;
     UINT r, count = 0;
-    int i;
+    UINT i;
 
     TRACE("%p %p\n", view, columns);
 




More information about the wine-cvs mailing list