diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-01-12 12:54:06 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-12 12:54:06 +0000 |
commit | 9702b2cceacddf207212953371ad3de8181db1b1 (patch) | |
tree | 98358892acda92c742083c7fcb5a77eab9f3512d /cppuhelper | |
parent | 6442218fc7da9ed51e86a41f4834c6e7d7262976 (diff) |
Some cppcheck cleaning
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/qa/unourl/cppu_unourl.cxx | 1 | ||||
-rw-r--r-- | cppuhelper/source/bootstrap.cxx | 2 | ||||
-rw-r--r-- | cppuhelper/source/propshlp.cxx | 3 | ||||
-rw-r--r-- | cppuhelper/source/tdmgr.cxx | 3 | ||||
-rw-r--r-- | cppuhelper/test/testpropshlp.cxx | 2 |
6 files changed, 5 insertions, 8 deletions
diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx index 4f47fd449..79d14c141 100644 --- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx +++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx @@ -129,7 +129,7 @@ namespace cppu_ifcontainer for (i = 0; i < nTests; i++) { Reference<XEventListener> xRef = new ContainerListener(&aStats); - int nNewLen = pContainer->addInterface(xRef); + pContainer->addInterface(xRef); aListeners.push_back(xRef); } Sequence< Reference< XInterface > > aElements; diff --git a/cppuhelper/qa/unourl/cppu_unourl.cxx b/cppuhelper/qa/unourl/cppu_unourl.cxx index c37d08a28..792ff8999 100644 --- a/cppuhelper/qa/unourl/cppu_unourl.cxx +++ b/cppuhelper/qa/unourl/cppu_unourl.cxx @@ -126,7 +126,6 @@ namespace cppu_unourl { "abc,def=%22", "abc,def=%22" }, { "abc,def=\"", "abc,def=\"" }, { "abc,def=%ed%a0%80", "abc,def=%ed%a0%80" } }; - bool bResult = true; for (int i = 0; i < sizeof aTests / sizeof (Test); ++i) { bool bValid = false; diff --git a/cppuhelper/source/bootstrap.cxx b/cppuhelper/source/bootstrap.cxx index b811dadef..17db064b7 100644 --- a/cppuhelper/source/bootstrap.cxx +++ b/cppuhelper/source/bootstrap.cxx @@ -273,7 +273,7 @@ OUString findBoostrapArgument( } Reference< registry::XSimpleRegistry > nestRegistries( - const OUString baseDir, + const OUString &baseDir, const Reference< lang::XSingleServiceFactory > & xSimRegFac, const Reference< lang::XSingleServiceFactory > & xNesRegFac, OUString csl_rdbs, diff --git a/cppuhelper/source/propshlp.cxx b/cppuhelper/source/propshlp.cxx index 42bb1c1c5..507a90faf 100644 --- a/cppuhelper/source/propshlp.cxx +++ b/cppuhelper/source/propshlp.cxx @@ -909,11 +909,11 @@ void OPropertySetHelper::firePropertiesChangeEvent( Sequence<PropertyChangeEvent> aChanges( nFireLen ); PropertyChangeEvent* pChanges = aChanges.getArray(); - sal_Int32 nFirePos = 0; { // must lock the mutex outside the loop. So all values are consistent. MutexGuard aGuard( rBHelper.rMutex ); Reference < XInterface > xSource( (XPropertySet *)this, UNO_QUERY ); + sal_Int32 nFirePos = 0; for( i = 0; i < nLen; i++ ) { if( pHandles[i] != -1 ) @@ -946,7 +946,6 @@ PropertyState OPropertySetHelper::getPropertyState( const OUString& PropertyName Sequence< PropertyState > OPropertySetHelper::getPropertyStates( const Sequence< OUString >& PropertyNames ) { ULONG nNames = PropertyNames.getLength(); - const OUString* pNames = PropertyNames.getConstArray(); Sequence< PropertyState > aStates( nNames ); return aStates; diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx index c5b76e4fe..90547ed9b 100644 --- a/cppuhelper/source/tdmgr.cxx +++ b/cppuhelper/source/tdmgr.cxx @@ -502,8 +502,7 @@ inline static typelib_TypeDescription * createCTD( 0, 0 ); // cleanup - if (pRefType) - typelib_typedescription_release( pRefType ); + typelib_typedescription_release( pRefType ); } return pRet; } diff --git a/cppuhelper/test/testpropshlp.cxx b/cppuhelper/test/testpropshlp.cxx index ebea7d092..862856711 100644 --- a/cppuhelper/test/testpropshlp.cxx +++ b/cppuhelper/test/testpropshlp.cxx @@ -461,7 +461,7 @@ public: { } - sal_Int32 getRefCount() + sal_Int32 getRefCount() const { return m_refCount; } // XEventListener |