cosv/source/unittest/string_ut.cxx | 8 +++----- extensions/source/scanner/sanedlg.cxx | 4 ++-- filter/source/config/cache/basecontainer.cxx | 1 + rsc/source/res/rscmgr.cxx | 7 ++----- sc/source/filter/xml/XMLColumnRowGroupExport.cxx | 2 +- sfx2/source/control/objface.cxx | 1 + stoc/test/testiadapter.cxx | 4 ++-- sw/source/ui/docvw/PostItMgr.cxx | 4 ++-- sw/source/ui/frmdlg/colex.cxx | 3 +-- uui/source/fltdlg.cxx | 13 +++++++------ vcl/source/gdi/print.cxx | 2 -- writerfilter/source/doctok/WW8StructBase.hxx | 2 +- 12 files changed, 23 insertions(+), 28 deletions(-)
New commits: commit b8d4b8656f1f4e4782ba7460070e99babc8a499e Author: Julien Nabet <serval2...@yahoo.fr> Date: Sun Jan 27 23:07:58 2013 +0100 Some cppcheck cleaning Change-Id: I7217ab7500de5d8220b85e56aceb6e843bd0769f diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 144daca..a69a452 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -625,16 +625,16 @@ IMPL_LINK( SaneDlg, ModifyHdl, Edit*, pEdit ) else if( pEdit == &maNumericEdit ) { double fValue; - char pBuf[256]; rtl::OString aContents(rtl::OUStringToOString(maNumericEdit.GetText(), osl_getThreadTextEncoding())); fValue = atof(aContents.getStr()); if( mfMin != mfMax && ( fValue < mfMin || fValue > mfMax ) ) { + char pBuf[256]; if( fValue < mfMin ) fValue = mfMin; else if( fValue > mfMax ) - fValue = mfMax; + fValue = mfMax; sprintf( pBuf, "%g", fValue ); maNumericEdit.SetText( String( pBuf, osl_getThreadTextEncoding() ) ); } diff --git a/filter/source/config/cache/basecontainer.cxx b/filter/source/config/cache/basecontainer.cxx index 8e65caa..e829d57 100644 --- a/filter/source/config/cache/basecontainer.cxx +++ b/filter/source/config/cache/basecontainer.cxx @@ -50,6 +50,7 @@ BaseContainer::BaseContainer() : BaseLock ( ) , m_rCache ( ) , m_pFlushCache(NULL ) + , m_eType() , m_lListener (m_aLock) { m_rCache->load(FilterCache::E_CONTAINS_STANDARD); diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx index 7d28932..be2301b 100644 --- a/rsc/source/res/rscmgr.cxx +++ b/rsc/source/res/rscmgr.cxx @@ -132,15 +132,12 @@ sal_Bool RscMgr::IsDefault( const RSCINST & rInst ){ |* *************************************************************************/ sal_Bool RscMgr::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){ - RscMgrInst * pClassData; - RscMgrInst * pDfltData; - if( !RscClass::IsValueDefault( rInst, pDef ) ) return sal_False; if( pDef ){ - pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size()); - pDfltData = (RscMgrInst *)(pDef + RscClass::Size()); + RscMgrInst * pClassData = (RscMgrInst *)(rInst.pData + RscClass::Size()); + RscMgrInst * pDfltData = (RscMgrInst *)(pDef + RscClass::Size()); if( !pClassData->aRefId.IsId() && !pDfltData->aRefId.IsId() ){ return sal_True; diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx index 458f941..51dcb9f 100644 --- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx +++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx @@ -27,7 +27,7 @@ using namespace xmloff::token; -ScMyColumnRowGroup::ScMyColumnRowGroup() +ScMyColumnRowGroup::ScMyColumnRowGroup() : bDisplay(false) { } diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index dc0417b..9e253f0 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -91,6 +91,7 @@ struct SfxInterface_Impl SfxInterface_Impl() : aPopupRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()), aStatBarRes(0,*SfxApplication::GetOrCreate()->GetSfxResManager()) + , pModule(NULL) , bRegistered(sal_False) { pObjectBars = new SfxObjectUIArr_Impl; diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 90c369c..768827d 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -925,9 +925,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons long lTopBorder = rBorder.Top() + 5; long lBottomBorder = rBorder.Bottom() - 5; const long lVisibleHeight = lBottomBorder - lTopBorder; //rBorder.GetHeight() ; - long lSpaceUsed = 0; long lTranslatePos = 0; - int loop = 0; bool bScrollbars = false; // do all neccessary resizings @@ -956,6 +954,8 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons //start the real layout so nothing overlaps anymore if (aVisiblePostItList.size()>1) { + long lSpaceUsed = 0; + int loop = 0; bool bDone = false; // if no window is moved anymore we are finished while (!bDone) diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx index 3fa7f29..a8cac26 100644 --- a/sw/source/ui/frmdlg/colex.cxx +++ b/sw/source/ui/frmdlg/colex.cxx @@ -42,14 +42,13 @@ -----------------------------------------------------------------------*/ void SwPageExample::UpdateExample( const SfxItemSet& rSet ) { - const SvxPageItem* pPage = 0; SfxItemPool* pPool = rSet.GetPool(); sal_uInt16 nWhich = pPool->GetWhich( SID_ATTR_PAGE ); if ( rSet.GetItemState( nWhich, sal_False ) == SFX_ITEM_SET ) { // alignment - pPage = (const SvxPageItem*)&rSet.Get( nWhich ); + const SvxPageItem* pPage = (const SvxPageItem*)&rSet.Get( nWhich ); if ( pPage ) SetUsage( pPage->GetPageUsage() ); diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx index 2e33302..27c644b 100644 --- a/uui/source/fltdlg.cxx +++ b/uui/source/fltdlg.cxx @@ -53,12 +53,13 @@ namespace uui *//*-*************************************************************************************************************/ FilterDialog::FilterDialog( Window* pParentWindow , ResMgr* pResMgr ) - : ModalDialog ( pParentWindow, ResId( DLG_FILTER_SELECT, *pResMgr ) ) - , m_ftURL ( this, ResId( FT_URL, *pResMgr ) ) - , m_lbFilters ( this, ResId( LB_FILTERS, *pResMgr ) ) - , m_btnOK ( this, ResId( BTN_OK, *pResMgr ) ) - , m_btnCancel ( this, ResId( BTN_CANCEL, *pResMgr ) ) - , m_btnHelp ( this, ResId( BTN_HELP, *pResMgr ) ) + : ModalDialog (pParentWindow, ResId( DLG_FILTER_SELECT, *pResMgr ) ) + , m_ftURL (this, ResId( FT_URL, *pResMgr)) + , m_lbFilters (this, ResId( LB_FILTERS, *pResMgr)) + , m_btnOK (this, ResId( BTN_OK, *pResMgr)) + , m_btnCancel (this, ResId( BTN_CANCEL, *pResMgr)) + , m_btnHelp (this, ResId( BTN_HELP, *pResMgr)) + , m_pFilterNames(NULL) { FreeResource(); } diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index d5ff3de..920d827 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1423,8 +1423,6 @@ sal_Bool Printer::EndJob() mnCurPage = 0; - bRet = sal_True; - mbPrinting = sal_False; mnCurPrintPage = 0; maJobName = rtl::OUString(); diff --git a/writerfilter/source/doctok/WW8StructBase.hxx b/writerfilter/source/doctok/WW8StructBase.hxx index 7039299..4b3d7c4 100644 --- a/writerfilter/source/doctok/WW8StructBase.hxx +++ b/writerfilter/source/doctok/WW8StructBase.hxx @@ -70,7 +70,7 @@ protected: public: WW8StructBase(sal_Int32 nLength) - : mSequence(nLength) + : mSequence(nLength), mpParent(NULL), mpDocument(NULL) { } commit c3488487752d2083b9e8a45266fdc40df84be686 Author: Julien Nabet <serval2...@yahoo.fr> Date: Sun Jan 27 21:07:03 2013 +0100 Fix ret value never used Change-Id: Ia1c1bf8d1eba3195f5eae2148d4c8c1ce2489140 diff --git a/cosv/source/unittest/string_ut.cxx b/cosv/source/unittest/string_ut.cxx index 95335e5..f2d8d51 100644 --- a/cosv/source/unittest/string_ut.cxx +++ b/cosv/source/unittest/string_ut.cxx @@ -46,8 +46,6 @@ check_value( const String & a, const char * b ) bool classtest_String( csv::SimpleString & rSimpleString ) { - bool ret = true; - String x1; UT_CHECK( String(), check_value(x1,"") ) @@ -61,9 +59,9 @@ classtest_String( csv::SimpleString & rSimpleString ) bool ret = ftest_Read( rSimpleString ); - ret = ftest_Write( rSimpleString ) AND ret; - ret = ftest_SeekBack( rSimpleString ) AND ret; - ret = ftest_SeekRelative( rSimpleString ) AND ret; + ret &= ftest_Write( rSimpleString ) AND ret; + ret &= ftest_SeekBack( rSimpleString ) AND ret; + ret &= ftest_SeekRelative( rSimpleString ) AND ret; rSimpleString.Close(); commit d5d202709f164edeb33e7cac7ddf5a8aa59f19ee Author: Julien Nabet <serval2...@yahoo.fr> Date: Sun Jan 27 21:04:43 2013 +0100 Fix uninitialized variables Change-Id: Iafd54c2b766bebf87cca211948a10695d585f0d9 diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx index 22230d6..9aaa29d 100644 --- a/stoc/test/testiadapter.cxx +++ b/stoc/test/testiadapter.cxx @@ -329,8 +329,8 @@ Any XLB_Invocation::invoke( const OUString & rFunctionName, sal_uInt32 nULong; sal_Int64 nHyper; sal_uInt64 nUHyper; - float fFloat; - double fDouble; + float fFloat = 0.0; + double fDouble = 0.0; TestEnum eEnum; OUString aString; Reference< XInterface > xInterface; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits