Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 17 new defect(s) introduced to LibreOffice found with Coverity Scan. 7 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 17 of 17 defect(s) ** CID 1596132: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596132: API usage errors (LOCK) /scripting/source/vbaevents/eventhelper.cxx: 529 in <unnamed>::EventListener::~EventListener()() 523 524 #define EVENTLSTNR_PROPERTY_ID_MODEL 1 525 constexpr OUStringLiteral EVENTLSTNR_PROPERTY_MODEL = u"Model"; 526 527 namespace { 528 >>> CID 1596132: API usage errors (LOCK) >>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state. 529 class EventListener : public EventListener_BASE 530 ,public ::comphelper::OPropertyContainer2 531 ,public ::comphelper::OPropertyArrayUsageHelper< EventListener > 532 { 533 534 public: ** CID 1596131: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596131: API usage errors (LOCK) /sc/source/ui/unoobj/celllistsource.cxx: 74 in calc::OCellListSource::~OCellListSource()() 68 { 69 if ( !m_bDisposed ) 70 { 71 acquire(); // prevent duplicate dtor 72 dispose(); 73 } >>> CID 1596131: API usage errors (LOCK) >>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state. 74 } 75 76 IMPLEMENT_FORWARD_XINTERFACE2( OCellListSource, OCellListSource_Base, OCellListSource_PBase ) 77 78 IMPLEMENT_FORWARD_XTYPEPROVIDER2( OCellListSource, OCellListSource_Base, OCellListSource_PBase ) 79 ** CID 1596130: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596130: API usage errors (LOCK) /chart2/source/tools/CachedDataSequence.cxx: 98 in chart::CachedDataSequence::~CachedDataSequence()() 92 } 93 94 registerProperties(); 95 } 96 97 CachedDataSequence::~CachedDataSequence() >>> CID 1596130: API usage errors (LOCK) >>> "~WeakComponentImplHelper" uses "this->m_aMutex" in an uninitialized state. 98 {} 99 100 void CachedDataSequence::registerProperties() 101 { 102 registerProperty( "NumberFormatKey", 103 PROP_NUMBERFORMAT_KEY, ** CID 1596129: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596129: API usage errors (LOCK) /scripting/source/basprov/basmethnode.cxx: 99 in basprov::BasicMethodNodeImpl::~BasicMethodNodeImpl()() 93 registerProperty( BASPROV_PROPERTY_EDITABLE, BASPROV_PROPERTY_ID_EDITABLE, BASPROV_DEFAULT_ATTRIBS(), &m_bEditable, cppu::UnoType<decltype(m_bEditable)>::get() ); 94 } 95 96 97 BasicMethodNodeImpl::~BasicMethodNodeImpl() 98 { >>> CID 1596129: API usage errors (LOCK) >>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state. 99 } 100 101 102 // XInterface 103 104 ** CID 1596128: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596128: API usage errors (LOCK) /sc/source/ui/unoobj/pageuno.cxx: 28 in ScPageObj::ScPageObj(SdrPage *)() 22 #include <pageuno.hxx> 23 #include <shapeuno.hxx> 24 25 using namespace ::com::sun::star; 26 27 ScPageObj::ScPageObj( SdrPage* pPage ) : >>> CID 1596128: API usage errors (LOCK) >>> "SvxDrawPage" initializes "this->m_aMutex" while it is already initialized. 28 SvxDrawPage( pPage ) 29 { 30 } 31 32 ScPageObj::~ScPageObj() noexcept 33 { ** CID 1596127: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596127: API usage errors (LOCK) /sccomp/source/solver/SolverComponent.cxx: 111 in SolverComponent::~SolverComponent()() 105 registerProperty( STR_EPSILONLEVEL, PROP_EPSILONLEVEL, 0, &mnEpsilonLevel, cppu::UnoType<decltype(mnEpsilonLevel)>::get() ); 106 registerProperty( STR_LIMITBBDEPTH, PROP_LIMITBBDEPTH, 0, &mbLimitBBDepth, cppu::UnoType<decltype(mbLimitBBDepth)>::get() ); 107 } 108 109 SolverComponent::~SolverComponent() 110 { >>> CID 1596127: API usage errors (LOCK) >>> "~WeakImplHelper" uses "this->m_aMutex" in an uninitialized state. 111 } 112 113 IMPLEMENT_FORWARD_XINTERFACE2( SolverComponent, SolverComponent_Base, comphelper::OPropertyContainer2 ) 114 IMPLEMENT_FORWARD_XTYPEPROVIDER2( SolverComponent, SolverComponent_Base, comphelper::OPropertyContainer2 ) 115 116 cppu::IPropertyArrayHelper* SolverComponent::createArrayHelper() const ** CID 1596126: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596126: API usage errors (LOCK) /connectivity/source/commontools/TPrivilegesResultSet.cxx: 33 in connectivity::OResultSetPrivileges::OResultSetPrivileges(const com::sun::star::uno::Reference<com::sun::star::sdbc::XDatabaseMetaData> &, const com::sun::star::uno::Any &, const rtl::OUString &, const rtl::OUString &)() 27 using namespace ::com::sun::star::lang; 28 29 OResultSetPrivileges::OResultSetPrivileges( const Reference< XDatabaseMetaData>& _rxMeta 30 , const Any& catalog 31 , const OUString& schemaPattern 32 , const OUString& tableNamePattern) >>> CID 1596126: API usage errors (LOCK) >>> "ODatabaseMetaDataResultSet" initializes "this->m_aMutex" while it is already initialized. 33 : ODatabaseMetaDataResultSet(eTablePrivileges) 34 , m_bResetValues(true) 35 { 36 osl_atomic_increment( &m_refCount ); 37 { 38 OUString sUserWorkingFor; ** CID 1596125: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596125: API usage errors (LOCK) /sccomp/source/solver/SwarmSolver.cxx: 104 in <unnamed>::SwarmSolver::~SwarmSolver()() 98 99 typedef comphelper::WeakImplHelper<sheet::XSolver, sheet::XSolverDescription, lang::XServiceInfo> 100 SwarmSolver_Base; 101 102 namespace 103 { >>> CID 1596125: API usage errors (LOCK) >>> "~WeakImplHelper" uses "this->m_aMutex" in an uninitialized state. 104 class SwarmSolver : public comphelper::OPropertyContainer2, 105 public comphelper::OPropertyArrayUsageHelper<SwarmSolver>, 106 public SwarmSolver_Base 107 { 108 private: 109 uno::Reference<sheet::XSpreadsheetDocument> mxDocument; ** CID 1596124: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596124: API usage errors (LOCK) /forms/source/xforms/datatypes.cxx: 70 in xforms::OXSDDataType::~OXSDDataType()() 64 { 65 } 66 67 68 OXSDDataType::~OXSDDataType() 69 { >>> CID 1596124: API usage errors (LOCK) >>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state. 70 } 71 72 73 void OXSDDataType::registerProperties() 74 { 75 registerProperty( PROPERTY_NAME, PROPERTY_ID_NAME, BOUND, &m_sName, cppu::UnoType<decltype(m_sName)>::get() ); ** CID 1596123: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596123: API usage errors (LOCK) /sc/source/ui/unoobj/chartuno.cxx: 427 in ScChartObj::~ScChartObj()() 421 ScChartObj::~ScChartObj() 422 { 423 SolarMutexGuard g; 424 425 if (pDocShell) 426 pDocShell->GetDocument().RemoveUnoObject(*this); >>> CID 1596123: API usage errors (LOCK) >>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state. 427 } 428 429 void ScChartObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) 430 { 431 //! update reference 432 ** CID 1596122: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596122: API usage errors (LOCK) /scripting/source/basprov/basscript.cxx: 97 in basprov::BasicScriptImpl::~BasicScriptImpl()() 91 BasicScriptImpl::~BasicScriptImpl() 92 { 93 SolarMutexGuard g; 94 95 if ( m_documentBasicManager ) 96 EndListening( *m_documentBasicManager ); >>> CID 1596122: API usage errors (LOCK) >>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state. 97 } 98 99 100 // SfxListener 101 102 void BasicScriptImpl::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) ** CID 1596121: Incorrect expression (IDENTICAL_BRANCHES) /sc/source/core/tool/interpr3.cxx: 4377 in ScInterpreter::Compare(ScSortInfoArray *, const boost::intrusive_ptr<ScMatrix> &, int, int) const() ________________________________________________________________________________________________________ *** CID 1596121: Incorrect expression (IDENTICAL_BRANCHES) /sc/source/core/tool/interpr3.cxx: 4377 in ScInterpreter::Compare(ScSortInfoArray *, const boost::intrusive_ptr<ScMatrix> &, int, int) const() 4371 do 4372 { 4373 ScSortInfo& rInfo1 = pArray->Get( nSort, nIndex1 ); 4374 ScSortInfo& rInfo2 = pArray->Get( nSort, nIndex2 ); 4375 if (!pMatSrc) 4376 { >>> CID 1596121: Incorrect expression (IDENTICAL_BRANCHES) >>> The same code is executed regardless of whether "this->aSortParam.bByRow" is true, because the 'then' and 'else' branches are identical. Should one of the branches be modified, or the entire 'if' statement replaced? 4377 if (aSortParam.bByRow) 4378 nRes = CompareCell( nSort, rInfo1.maCell, rInfo2.maCell ); 4379 else 4380 nRes = CompareCell( nSort, rInfo1.maCell, rInfo2.maCell ); 4381 } 4382 else ** CID 1596120: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596120: API usage errors (LOCK) /sc/source/ui/unoobj/cellvaluebinding.cxx: 81 in calc::OCellValueBinding::~OCellValueBinding()() 75 { 76 if ( !m_bDisposed ) 77 { 78 acquire(); // prevent duplicate dtor 79 dispose(); 80 } >>> CID 1596120: API usage errors (LOCK) >>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state. 81 } 82 83 IMPLEMENT_FORWARD_XINTERFACE2( OCellValueBinding, OCellValueBinding_Base, OCellValueBinding_PBase ) 84 85 IMPLEMENT_FORWARD_XTYPEPROVIDER2( OCellValueBinding, OCellValueBinding_Base, OCellValueBinding_PBase ) 86 ** CID 1596119: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596119: API usage errors (LOCK) /chart2/source/tools/UncachedDataSequence.cxx: 92 in chart::UncachedDataSequence::~UncachedDataSequence()() 86 m_xModifyEventForwarder( new ModifyEventForwarder() ) 87 { 88 registerProperties(); 89 } 90 91 UncachedDataSequence::~UncachedDataSequence() >>> CID 1596119: API usage errors (LOCK) >>> "~WeakComponentImplHelper" uses "this->m_aMutex" in an uninitialized state. 92 {} 93 94 void UncachedDataSequence::registerProperties() 95 { 96 registerProperty( "NumberFormatKey", 97 PROP_NUMBERFORMAT_KEY, ** CID 1596118: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596118: API usage errors (LOCK) /connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx: 68 in connectivity::ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet()() 62 setType(_eType); 63 } 64 65 66 ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet() 67 { >>> CID 1596118: API usage errors (LOCK) >>> "~OPropertyContainer2" uses "this->m_aMutex" in an uninitialized state. 68 } 69 70 void ODatabaseMetaDataResultSet::construct() 71 { 72 registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, 0,&m_nFetchSize, ::cppu::UnoType<sal_Int32>::get()); 73 registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE), PROPERTY_ID_RESULTSETTYPE, PropertyAttribute::READONLY,&m_nResultSetType, ::cppu::UnoType<sal_Int32>::get()); ** CID 1596117: API usage errors (LOCK) ________________________________________________________________________________________________________ *** CID 1596117: API usage errors (LOCK) /reportdesign/source/core/sdr/ReportDrawPage.cxx: 40 in reportdesign::OReportDrawPage::OReportDrawPage(SdrPage *, const com::sun::star::uno::Reference<com::sun::star::report::XSection> &)() 34 { 35 using namespace ::com::sun::star; 36 using namespace rptui; 37 38 OReportDrawPage::OReportDrawPage(SdrPage* _pPage 39 ,const uno::Reference< report::XSection >& _xSection) >>> CID 1596117: API usage errors (LOCK) >>> "SvxDrawPage" initializes "this->m_aMutex" while it is already initialized. 40 : SvxDrawPage(_pPage) 41 ,m_xSection(_xSection) 42 { 43 } 44 45 rtl::Reference<SdrObject> OReportDrawPage::CreateSdrObject_(const uno::Reference< drawing::XShape > & xDescr) ** CID 1596116: Uninitialized members (UNINIT_CTOR) /cui/source/inc/whatsnew.hxx: 40 in WhatsNewProgress::WhatsNewProgress()() ________________________________________________________________________________________________________ *** CID 1596116: Uninitialized members (UNINIT_CTOR) /cui/source/inc/whatsnew.hxx: 40 in WhatsNewProgress::WhatsNewProgress()() 34 { 35 sal_Int32 m_nTotal; 36 sal_Int32 m_nCurrent; 37 virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override; 38 39 public: >>> CID 1596116: Uninitialized members (UNINIT_CTOR) >>> Non-static class member "m_nCurrent" is not initialized in this constructor nor in any functions that it calls. 40 WhatsNewProgress(){}; 41 void Update(const sal_Int32 nCurrent, const sal_Int32 nTotal) 42 { 43 m_nTotal = nTotal; 44 m_nCurrent = nCurrent; 45 Invalidate(); ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DJ-eu_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtX71BLExRu2D7zMHS1J8Xc0MtqKJ9IZjsaWeorU-2B4MllH0jrQRJAEwTXDX8GhXHD5EEpEU6CIrTAR8oXn0R4iEfeyXly-2BzLkwsf7uz37y583zU7a-2B49mUMxfVjZ7saEtQmsgwsXWM7kejDRDmF5-2F4xserEMO3OTEdlHSIT0fUk3c-3D