From 68975938f656c7b40d258d5587bd75288c5d2726 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Mon, 21 Apr 2008 22:23:21 +0100 Subject: [PATCH] msi: Remove unused variables. --- dlls/msi/action.c | 3 +-- dlls/msi/msiquery.c | 5 +---- dlls/msi/source.c | 5 ++--- dlls/msi/sql.y | 3 +-- dlls/msi/suminfo.c | 3 +-- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index d7acc127f6e..11a4ad76826 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 662b4fbb8ce..912a29974bb 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 f50d545ce95..0f9e0872312 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 94c36cdb8a5..e61038333d7 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 d78e8ad04d1..35dc6527919 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 );