[PATCH 2/6] [cppchecker] deletion of unneded variable in setup_native, swappatchfiles.cxx

Pierre-André Jacquod pjacquod at alumni.ethz.ch
Fri Sep 9 12:26:21 PDT 2011


---
 .../win32/customactions/patch/swappatchfiles.cxx   |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
index db7fbeb..5028a5f 100644
--- a/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
+++ b/setup_native/source/win32/customactions/patch/swappatchfiles.cxx
@@ -691,7 +691,6 @@ extern "C" UINT __stdcall IsOfficeRunning( MSIHANDLE handle )
 
 extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
 {
-    std::_tstring   mystr;
 
     // 1. Reading Product Code from setup.ini of installed Office
 
@@ -719,7 +718,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
 
     std::_tstring productCode = TEXT(szProductCode);
     productCode = ConvertGuid(std::_tstring(productCode.c_str() + 1, productCode.length() - 2));
-    mystr = TEXT("Changed product code: ") + productCode;
 
     // 3. Setting path in the Windows registry to find installed features
 
@@ -730,13 +728,11 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
     {
         registryRoot = HKEY_LOCAL_MACHINE;
         registryKey = TEXT("Software\\Classes\\Installer\\Features\\") + productCode;
-        mystr = registryKey;
     }
     else
     {
         registryRoot = HKEY_CURRENT_USER;
         registryKey = TEXT("Software\\Microsoft\\Installer\\Features\\") + productCode;
-        mystr = registryKey;
     }
 
     // 4. Collecting all installed features from Windows registry
@@ -760,7 +756,6 @@ extern "C" UINT __stdcall SetFeatureState( MSIHANDLE handle )
             if ( ERROR_SUCCESS == lEnumResult )
             {
                 std::_tstring sValueName = szValueName;
-                std::_tstring sValueData = szValueData;
 
                 // Does this feature exist in this patch?
                 if ( IsSetMsiProperty(handle, sValueName) )
-- 
1.7.3.4


--------------080908080707040506040403
Content-Type: text/x-patch;
 name="0001-cppchecker-deletion-of-unneded-variable-in-fpicker-p.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-cppchecker-deletion-of-unneded-variable-in-fpicker-p.pa";
 filename*1="tch"



More information about the LibreOffice mailing list