connectivity/source/drivers/mork/mork_helper.cxx | 5 +---- sal/qa/osl/process/osl_Thread.cxx | 8 ++++---- sax/source/expatwrap/sax_expat.cxx | 4 ++-- sax/source/expatwrap/saxwriter.cxx | 14 +++++++------- sc/source/filter/starcalc/collect.cxx | 1 - sw/source/core/text/itrpaint.cxx | 2 +- sw/source/core/text/porlay.hxx | 6 +++++- vcl/workben/vcldemo.cxx | 2 +- 8 files changed, 21 insertions(+), 21 deletions(-)
New commits: commit ddb3c4531c657cda6ae20dd950020cea1d12ba2e Author: Caolán McNamara <caol...@redhat.com> Date: Sun May 10 21:25:41 2015 +0100 cppcheck: unnecessaryQualification Change-Id: Ief6abf58b36a9f00b63e3ca71900b026628c996c diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index 8ddfca0..a270718 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -167,7 +167,7 @@ public: static std::vector<Rectangle> partition(const RenderContext &rCtx, int nX, int nY) { - return DemoRenderer::partition(rCtx.maSize, nX, nY); + return partition(rCtx.maSize, nX, nY); } static std::vector<Rectangle> partition(Size aSize, int nX, int nY) commit 6ac930d25f368bfbd984e79c758747318aa34b3c Author: Caolán McNamara <caol...@redhat.com> Date: Sun May 10 21:20:33 2015 +0100 cppcheck: cstyleCast Change-Id: I0cc54e443793dda9bd11a907cc79b54dab3810ad diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 2e93cdd..2583b4e 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -550,7 +550,7 @@ void SwTxtPainter::CheckSpecialUnderline( const SwLinePortion* pPor, { // here starts the algorithm for calculating the underline font SwScriptInfo& rScriptInfo = GetInfo().GetParaPortion()->GetScriptInfo(); - SwAttrIter aIter( *(SwTxtNode*)GetInfo().GetTxtFrm()->GetTxtNode(), + SwAttrIter aIter( *GetInfo().GetTxtFrm()->GetTxtNode(), rScriptInfo ); sal_Int32 nTmpIdx = nIndx; diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index 3784cda..a19be48 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -378,7 +378,11 @@ inline void SwParaPortion::FormatReset() } inline SwLinePortion *SwLineLayout::GetFirstPortion() const -{ return( pPortion ? pPortion : (SwLinePortion*)this ); } +{ + const SwLinePortion *pRet = pPortion ? pPortion : this; + return const_cast<SwLinePortion*>(pRet); +} + #endif commit 399fa0ee267a1927c14ce7ca7c19881761034154 Author: Caolán McNamara <caol...@redhat.com> Date: Sun May 10 21:18:34 2015 +0100 cppcheck: uselessAssignmentPtrArg Change-Id: Ie7844af5ab7ead6383e60933588f66c5871f3282 diff --git a/connectivity/source/drivers/mork/mork_helper.cxx b/connectivity/source/drivers/mork/mork_helper.cxx index 103cc47..9674f5a 100644 --- a/connectivity/source/drivers/mork/mork_helper.cxx +++ b/connectivity/source/drivers/mork/mork_helper.cxx @@ -35,11 +35,8 @@ bool openAddressBook(const std::string& path) return true; } -int main( int argc, const char* argv[] ) +int main(void) { - int x = argc; - x++; - argv++; ProfileAccess* access = new ProfileAccess(); OUString defaultProfile = access->getDefaultProfile(::com::sun::star::mozilla::MozillaProductType_Thunderbird); SAL_INFO("connectivity.mork", "DefaultProfile: " << defaultProfile); commit 4bfa6831908855ba6b8f741f730ebf28526e83f7 Author: Caolán McNamara <caol...@redhat.com> Date: Sun May 10 21:15:45 2015 +0100 cppcheck: uselessAssignmentPtrArg Change-Id: I19d0903c09c63198f20260f67cddd14a7552fc19 diff --git a/sc/source/filter/starcalc/collect.cxx b/sc/source/filter/starcalc/collect.cxx index 54b9f15..dcc2085 100644 --- a/sc/source/filter/starcalc/collect.cxx +++ b/sc/source/filter/starcalc/collect.cxx @@ -36,7 +36,6 @@ static void lcl_DeleteScDataObjects( ScDataObject** p, sal_uInt16 nCount ) { for (sal_uInt16 i = 0; i < nCount; i++) delete p[i]; delete[] p; - p = NULL; } } commit b6b4816d51e99d8843ade4cc6a64774683796119 Author: Caolán McNamara <caol...@redhat.com> Date: Sun May 10 21:13:40 2015 +0100 cppcheck: help out unusedScopedObject false positive Change-Id: I0df7a930ff970c26fbbb03d9333108ee3cae7ad4 diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 5ab8836..403490d 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -1523,7 +1523,7 @@ namespace osl_Thread /** Test of the osl::Thread::wait method */ - class wait : public CppUnit::TestFixture + class waittest : public CppUnit::TestFixture { public: void setUp() SAL_OVERRIDE {} @@ -1576,10 +1576,10 @@ namespace osl_Thread } - CPPUNIT_TEST_SUITE(wait); + CPPUNIT_TEST_SUITE(waittest); CPPUNIT_TEST(wait_001); CPPUNIT_TEST_SUITE_END(); - }; // class wait + }; // class waittest /** osl::Thread::yield method: can not design good test scenario to test up to now */ @@ -1728,7 +1728,7 @@ namespace osl_Thread CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Thread::getPriority, "osl_Thread"); CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Thread::getIdentifier, "osl_Thread"); CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Thread::getCurrentIdentifier, "osl_Thread"); - CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Thread::wait, "osl_Thread"); + CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Thread::waittest, "osl_Thread"); CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Thread::yield, "osl_Thread"); CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(osl_Thread::schedule, "osl_Thread"); } // namespace osl_Thread commit cbf8a5c8b208c0a6b87a19f799dc5d5613e61e5f Author: Caolán McNamara <caol...@redhat.com> Date: Sun May 10 21:07:30 2015 +0100 cppcheck: noExplicitConstructor Change-Id: Ic334d7b0110319e0c581eecd111b73d1cce3134d diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx index bbf608f..8bbfd24 100644 --- a/sax/source/expatwrap/sax_expat.cxx +++ b/sax/source/expatwrap/sax_expat.cxx @@ -361,9 +361,9 @@ class LocatorImpl : // should use a different interface for stream positions! { public: - LocatorImpl( SaxExpatParser_Impl *p ) + explicit LocatorImpl(SaxExpatParser_Impl *p) + : m_pParser(p) { - m_pParser = p; } public: //XLocator diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx index 0043e65..feb8efd 100644 --- a/sax/source/expatwrap/saxwriter.cxx +++ b/sax/source/expatwrap/saxwriter.cxx @@ -106,13 +106,13 @@ private: sal_uInt32& rPos) throw( SAXException ); inline void FinishStartElement() throw( SAXException ); public: - SaxWriterHelper(Reference< XOutputStream > m_TempOut) : - m_out(m_TempOut), - m_Sequence(SEQUENCESIZE), - mp_Sequence(NULL), - nLastLineFeedPos(0), - nCurrentPos(0), - m_bStartElementFinished(true) + explicit SaxWriterHelper(Reference< XOutputStream > m_TempOut) + : m_out(m_TempOut) + , m_Sequence(SEQUENCESIZE) + , mp_Sequence(NULL) + , nLastLineFeedPos(0) + , nCurrentPos(0) + , m_bStartElementFinished(true) { OSL_ENSURE(SEQUENCESIZE > 50, "Sequence cache size to small"); mp_Sequence = m_Sequence.getArray();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits