msi: Remove unused variables

Andrew Talbot andrew.talbot at talbotville.com
Mon Apr 21 16:23:21 CDT 2008


Changelog:
    msi: Remove unused variables.

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index d7acc12..11a4ad7 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -5068,7 +5068,7 @@ static LONG env_set_flags( LPCWSTR *name, LPCWSTR *value, DWORD *flags )
 static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
 {
     MSIPACKAGE *package = param;
-    LPCWSTR name, value, comp;
+    LPCWSTR name, value;
     LPWSTR data = NULL, newval = NULL;
     LPWSTR deformatted = NULL, ptr;
     DWORD flags, type, size;
@@ -5088,7 +5088,6 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
 
     name = MSI_RecordGetString(rec, 2);
     value = MSI_RecordGetString(rec, 3);
-    comp = MSI_RecordGetString(rec, 4);
 
     res = env_set_flags(&name, &value, &flags);
     if (res != ERROR_SUCCESS)
diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c
index 662b4fb..912a299 100644
--- a/dlls/msi/msiquery.c
+++ b/dlls/msi/msiquery.c
@@ -869,15 +869,12 @@ UINT MSI_DatabaseGetPrimaryKeys( MSIDATABASE *db,
         '`','T','a','b','l','e','`',' ','=',' ','\'','%','s','\'',0 };
     struct msi_primary_key_record_info info;
     MSIQUERY *query = NULL;
-    MSIVIEW *view;
     UINT r;
-    
+
     r = MSI_OpenQuery( db, &query, sql, table );
     if( r != ERROR_SUCCESS )
         return r;
 
-    view = query->view;
-
     /* count the number of primary key records */
     info.n = 0;
     info.rec = 0;
diff --git a/dlls/msi/source.c b/dlls/msi/source.c
index f50d545..0f9e087 100644
--- a/dlls/msi/source.c
+++ b/dlls/msi/source.c
@@ -153,7 +153,6 @@ UINT WINAPI MsiSourceListEnumMediaDisksA(LPCSTR szProductCodeOrPatchCode,
     LPWSTR usersid = NULL;
     LPWSTR volume = NULL;
     LPWSTR prompt = NULL;
-    DWORD volumesz, promptsz;
     UINT r = ERROR_INVALID_PARAMETER;
 
     TRACE("(%s, %s, %d, %d, %d, %p, %p, %p, %p, %p)\n", debugstr_a(szProductCodeOrPatchCode),
@@ -183,11 +182,11 @@ UINT WINAPI MsiSourceListEnumMediaDisksA(LPCSTR szProductCodeOrPatchCode,
         goto done;
 
     if (szVolumeLabel && pcchVolumeLabel)
-        volumesz = WideCharToMultiByte(CP_ACP, 0, volume, -1, szVolumeLabel,
+        WideCharToMultiByte(CP_ACP, 0, volume, -1, szVolumeLabel,
                             *pcchVolumeLabel + 1, NULL, NULL);
 
     if (szDiskPrompt)
-        promptsz = WideCharToMultiByte(CP_ACP, 0, prompt, -1, szDiskPrompt,
+        WideCharToMultiByte(CP_ACP, 0, prompt, -1, szDiskPrompt,
                             *pcchDiskPrompt + 1, NULL, NULL);
 
 done:
diff --git a/dlls/msi/sql.y b/dlls/msi/sql.y
index 94c36cd..e610383 100644
--- a/dlls/msi/sql.y
+++ b/dlls/msi/sql.y
@@ -142,9 +142,8 @@ oneinsert:
         {
             SQL_input *sql = (SQL_input*) info;
             MSIVIEW *insert = NULL;
-            UINT r;
 
-            r = INSERT_CreateView( sql->db, &insert, $3, $5, $9, FALSE );
+            INSERT_CreateView( sql->db, &insert, $3, $5, $9, FALSE );
             if( !insert )
                 YYABORT;
             $$ = insert;
diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c
index d78e8ad..35dc652 100644
--- a/dlls/msi/suminfo.c
+++ b/dlls/msi/suminfo.c
@@ -371,7 +371,7 @@ static UINT save_summary_info( const MSISUMMARYINFO * si, IStream *stm )
     LPBYTE data = NULL;
     ULONG count, sz;
     HRESULT r;
-    int i, n;
+    int i;
 
     /* write the header */
     sz = sizeof set_hdr;
@@ -397,7 +397,6 @@ static UINT save_summary_info( const MSISUMMARYINFO * si, IStream *stm )
     section_hdr.cbSection = sizeof section_hdr;
     section_hdr.cbSection += (get_property_count( si->property ) * sizeof idofs[0]);
     section_hdr.cProperties = 0;
-    n = 0;
     for( i = 0; i < MSI_MAX_PROPS; i++ )
     {
         sz = write_property_to_data( &si->property[i], NULL );



More information about the wine-patches mailing list