[Libreoffice-commits] core.git: filter/source lotuswordpro/source sc/source sfx2/source

Julien Nabet serval2412 at yahoo.fr
Wed Aug 21 22:15:21 PDT 2013


 filter/source/t602/t602filter.cxx       |    4 +---
 lotuswordpro/source/filter/lwppara.cxx  |    3 +--
 sc/source/core/opencl/openclwrapper.cxx |    1 +
 sfx2/source/menu/virtmenu.cxx           |    5 ++---
 4 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit af14ad6c20f9e8422a1016b650c7d83a5cc7dc00
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Aug 22 06:33:39 2013 +0200

    cppcheck: fix redundant assignments
    
    Change-Id: Ib0c2f0c2b67f40ce75469b434a67c62187aca93d

diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 8f01525..5dc1312 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -919,8 +919,6 @@ Locale SAL_CALL T602ImportFilterDialog::getLocale()
 
 sal_Bool T602ImportFilterDialog::OptionsDlg()
 {
-    sal_Bool ret = sal_False;
-
     Any any;
 #define _propInt(_prop,_nam,_val) \
     any <<= (sal_Int32)_val;\
@@ -1079,7 +1077,7 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
     dialog->setVisible( false );
     dialog->createPeer( xToolkit, NULL );
 
-    ret = ( dialog->execute() != 0 );
+    sal_Bool ret = ( dialog->execute() != 0 );
     if ( ret ) {
 
         sal_Int16 tt = 0;
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 5628772..12d647b 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -316,8 +316,7 @@ sal_Bool LwpPara::RegisterMasterPage(XFParaStyle* pBaseStyle)
     //if pagelayout is modified, register the pagelayout
     if(pStory && pStory->IsPMModified())
     {
-        sal_Bool bNewSection = sal_False;
-        bNewSection = pStory->IsNeedSection();
+        sal_Bool bNewSection = pStory->IsNeedSection();
         LwpPageLayout* pLayout = pStory->GetCurrentLayout();
         if(bNewSection)
         {
diff --git a/sc/source/core/opencl/openclwrapper.cxx b/sc/source/core/opencl/openclwrapper.cxx
index 0557717..1179f0f1 100644
--- a/sc/source/core/opencl/openclwrapper.cxx
+++ b/sc/source/core/opencl/openclwrapper.cxx
@@ -848,6 +848,7 @@ int OpenclDevice::InitOpenclRunEnv( GPUEnv *gpuInfo )
     }
 
     clStatus = clGetCommandQueueInfo( gpuInfo->mpCmdQueue, CL_QUEUE_THREAD_HANDLE_AMD, 0, NULL, NULL );
+    CHECK_OPENCL( clStatus, "GetCommandQueueInfo" );
     // Check device extensions for double type
     size_t aDevExtInfoSize = 0;
 
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 0d04deb..fbc4c60 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -636,11 +636,10 @@ bool SfxVirtualMenu::Bind_Impl( Menu *pMenu )
 
     for ( sal_uInt16 nPos = 0; nPos < nCount; ++nPos )
     {
-        // found the Sub-Menu in question?
-        bool bFound = false;
         sal_uInt16 nSID = pSVMenu->GetItemId(nPos);
         SfxMenuControl &rCtrl = pItems[nPos];
-        bFound = pSVMenu->GetPopupMenu(nSID) == pMenu;
+        // found the Sub-Menu in question?
+        bool bFound = pSVMenu->GetPopupMenu(nSID) == pMenu;
         SfxVirtualMenu *pSubMenu = rCtrl.GetPopupMenu();
 
         if ( bFound )


More information about the Libreoffice-commits mailing list