Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 13 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 13 of 13 defect(s) ** CID 1634586: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /desktop/source/lib/init.cxx: 7283 in doc_insertCertificate(_LibreOfficeKitDocument *, const unsigned char *, int, const unsigned char *, int)() ________________________________________________________________________________________________________ *** CID 1634586: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /desktop/source/lib/init.cxx: 7283 in doc_insertCertificate(_LibreOfficeKitDocument *, const unsigned char *, int, const unsigned char *, int)() 7277 if (!xCertificate.is()) 7278 return false; 7279 7280 SolarMutexGuard aGuard; 7281 7282 svl::crypto::SigningContext aSigningContext; >>> CID 1634586: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xCertificate" is copied in a call to copy assignment "operator =", when it could be moved instead. 7283 aSigningContext.m_xCertificate = xCertificate; 7284 return pObjectShell->SignDocumentContentUsingCertificate(aSigningContext); 7285 } 7286 7287 static bool doc_addCertificate(LibreOfficeKitDocument* pThis, 7288 const unsigned char* pCertificateBinary, const int nCertificateBinarySize) ** CID 1634585: Performance inefficiencies (AUTO_CAUSES_COPY) /basegfx/source/polygon/b3dpolygontools.cxx: 107 in basegfx::utils::applyLineDashing(const basegfx::B3DPolygon &, const std::vector<double, std::allocator<double>> &, basegfx::B3DPolyPolygon *, double)() ________________________________________________________________________________________________________ *** CID 1634585: Performance inefficiencies (AUTO_CAUSES_COPY) /basegfx/source/polygon/b3dpolygontools.cxx: 107 in basegfx::utils::applyLineDashing(const basegfx::B3DPolygon &, const std::vector<double, std::allocator<double>> &, basegfx::B3DPolyPolygon *, double)() 101 if(pLineTarget) 102 { 103 pLineTarget->clear(); 104 } 105 106 // provide callback as lambda >>> CID 1634585: Performance inefficiencies (AUTO_CAUSES_COPY) >>> Using the "auto" keyword without an "&" causes the copy of an object of type "std::function<void (basegfx::B3DPolygon const &)>". 107 const auto rLineCallback( 108 nullptr == pLineTarget 109 ? std::function<void(const basegfx::B3DPolygon&)>() 110 : [&pLineTarget](const basegfx::B3DPolygon& rSnippet){ pLineTarget->append(rSnippet); }); 111 112 // call version that uses callbacks ** CID 1634584: Uninitialized variables (UNINIT) ________________________________________________________________________________________________________ *** CID 1634584: Uninitialized variables (UNINIT) /UnoControls/source/base/multiplexer.cxx: 142 in unocontrols::OMRCListenerMultiplexerHelper::unadvise(const com::sun::star::uno::Type &, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener> &)() 136 // container method 137 138 void OMRCListenerMultiplexerHelper::unadvise( const Type& aType , 139 const Reference< XEventListener >& xListener ) 140 { 141 std::unique_lock aGuard(m_aMutex); >>> CID 1634584: Uninitialized variables (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "removeInterface". 142 if (m_aListenerHolder.removeInterface(aGuard, aType, xListener) == 0) 143 { 144 // the last listener is removed 145 if ( m_xPeer.is() ) 146 { 147 impl_unadviseFromPeer( m_xPeer, aType ); ** CID 1634583: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sfx2/source/doc/objserv.cxx: 584 in SfxObjectShell::ExecFile_Impl(SfxRequest &)() ________________________________________________________________________________________________________ *** CID 1634583: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sfx2/source/doc/objserv.cxx: 584 in SfxObjectShell::ExecFile_Impl(SfxRequest &)() 578 { 579 uno::Reference<security::XCertificate> xCertificate = GetSignPDFCertificate(); 580 if (xCertificate.is()) 581 { 582 583 svl::crypto::SigningContext aSigningContext; >>> CID 1634583: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xCertificate" is copied in a call to copy assignment "operator =", when it could be moved instead. 584 aSigningContext.m_xCertificate = xCertificate; 585 bHaveWeSigned |= SignDocumentContentUsingCertificate(aSigningContext); 586 587 // Reload to show how the PDF actually looks like after signing. This also 588 // changes "finish signing" on the infobar back to "sign document" as a side 589 // effect. ** CID 1634582: (UNINIT) ________________________________________________________________________________________________________ *** CID 1634582: (UNINIT) /UnoControls/source/base/multiplexer.cxx: 51 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XWindowListener, com::sun::star::awt::WindowEvent>(void (T1::*)(const T2 &), const T2 &)() 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; 48 /* Remark: The control is the event source not the peer.*/ 49 /* We must change the source of the event. */ 50 aLocalEvent.Source = m_xControl; >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_device" when calling "unlock". 51 aGuard.unlock(); 52 /* Is the control not destroyed? */ 53 if (!aLocalEvent.Source) 54 return; 55 if (!aIterator.hasMoreElements()) 56 return; /UnoControls/source/base/multiplexer.cxx: 42 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XMouseMotionListener, com::sun::star::awt::MouseEvent>(void (T1::*)(const T2 &), const T2 &)() 36 template <class Interface, typename Event> 37 void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method)(const Event&), 38 const Event& event) 39 { 40 std::unique_lock aGuard(m_aMutex); 41 /* First get all interfaces from container with right type.*/ >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainer". 42 auto* pContainer = m_aListenerHolder.getContainer(aGuard, cppu::UnoType<Interface>::get()); 43 /* Do the follow only, if elements in container exist.*/ 44 if (!pContainer) 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; /UnoControls/source/base/multiplexer.cxx: 42 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XMouseListener, com::sun::star::awt::MouseEvent>(void (T1::*)(const T2 &), const T2 &)() 36 template <class Interface, typename Event> 37 void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method)(const Event&), 38 const Event& event) 39 { 40 std::unique_lock aGuard(m_aMutex); 41 /* First get all interfaces from container with right type.*/ >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainer". 42 auto* pContainer = m_aListenerHolder.getContainer(aGuard, cppu::UnoType<Interface>::get()); 43 /* Do the follow only, if elements in container exist.*/ 44 if (!pContainer) 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; /UnoControls/source/base/multiplexer.cxx: 42 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XKeyListener, com::sun::star::awt::KeyEvent>(void (T1::*)(const T2 &), const T2 &)() 36 template <class Interface, typename Event> 37 void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method)(const Event&), 38 const Event& event) 39 { 40 std::unique_lock aGuard(m_aMutex); 41 /* First get all interfaces from container with right type.*/ >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainer". 42 auto* pContainer = m_aListenerHolder.getContainer(aGuard, cppu::UnoType<Interface>::get()); 43 /* Do the follow only, if elements in container exist.*/ 44 if (!pContainer) 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; /UnoControls/source/base/multiplexer.cxx: 51 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XKeyListener, com::sun::star::awt::KeyEvent>(void (T1::*)(const T2 &), const T2 &)() 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; 48 /* Remark: The control is the event source not the peer.*/ 49 /* We must change the source of the event. */ 50 aLocalEvent.Source = m_xControl; >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_device" when calling "unlock". 51 aGuard.unlock(); 52 /* Is the control not destroyed? */ 53 if (!aLocalEvent.Source) 54 return; 55 if (!aIterator.hasMoreElements()) 56 return; /UnoControls/source/base/multiplexer.cxx: 51 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XMouseMotionListener, com::sun::star::awt::MouseEvent>(void (T1::*)(const T2 &), const T2 &)() 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; 48 /* Remark: The control is the event source not the peer.*/ 49 /* We must change the source of the event. */ 50 aLocalEvent.Source = m_xControl; >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_device" when calling "unlock". 51 aGuard.unlock(); 52 /* Is the control not destroyed? */ 53 if (!aLocalEvent.Source) 54 return; 55 if (!aIterator.hasMoreElements()) 56 return; /UnoControls/source/base/multiplexer.cxx: 42 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XFocusListener, com::sun::star::awt::FocusEvent>(void (T1::*)(const T2 &), const T2 &)() 36 template <class Interface, typename Event> 37 void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method)(const Event&), 38 const Event& event) 39 { 40 std::unique_lock aGuard(m_aMutex); 41 /* First get all interfaces from container with right type.*/ >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainer". 42 auto* pContainer = m_aListenerHolder.getContainer(aGuard, cppu::UnoType<Interface>::get()); 43 /* Do the follow only, if elements in container exist.*/ 44 if (!pContainer) 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; /UnoControls/source/base/multiplexer.cxx: 42 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XPaintListener, com::sun::star::awt::PaintEvent>(void (T1::*)(const T2 &), const T2 &)() 36 template <class Interface, typename Event> 37 void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method)(const Event&), 38 const Event& event) 39 { 40 std::unique_lock aGuard(m_aMutex); 41 /* First get all interfaces from container with right type.*/ >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainer". 42 auto* pContainer = m_aListenerHolder.getContainer(aGuard, cppu::UnoType<Interface>::get()); 43 /* Do the follow only, if elements in container exist.*/ 44 if (!pContainer) 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; /UnoControls/source/base/multiplexer.cxx: 51 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XFocusListener, com::sun::star::awt::FocusEvent>(void (T1::*)(const T2 &), const T2 &)() 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; 48 /* Remark: The control is the event source not the peer.*/ 49 /* We must change the source of the event. */ 50 aLocalEvent.Source = m_xControl; >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_device" when calling "unlock". 51 aGuard.unlock(); 52 /* Is the control not destroyed? */ 53 if (!aLocalEvent.Source) 54 return; 55 if (!aIterator.hasMoreElements()) 56 return; /UnoControls/source/base/multiplexer.cxx: 51 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XPaintListener, com::sun::star::awt::PaintEvent>(void (T1::*)(const T2 &), const T2 &)() 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; 48 /* Remark: The control is the event source not the peer.*/ 49 /* We must change the source of the event. */ 50 aLocalEvent.Source = m_xControl; >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_device" when calling "unlock". 51 aGuard.unlock(); 52 /* Is the control not destroyed? */ 53 if (!aLocalEvent.Source) 54 return; 55 if (!aIterator.hasMoreElements()) 56 return; /UnoControls/source/base/multiplexer.cxx: 42 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XWindowListener, com::sun::star::awt::WindowEvent>(void (T1::*)(const T2 &), const T2 &)() 36 template <class Interface, typename Event> 37 void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method)(const Event&), 38 const Event& event) 39 { 40 std::unique_lock aGuard(m_aMutex); 41 /* First get all interfaces from container with right type.*/ >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainer". 42 auto* pContainer = m_aListenerHolder.getContainer(aGuard, cppu::UnoType<Interface>::get()); 43 /* Do the follow only, if elements in container exist.*/ 44 if (!pContainer) 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; /UnoControls/source/base/multiplexer.cxx: 42 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XWindowListener, com::sun::star::lang::EventObject>(void (T1::*)(const T2 &), const T2 &)() 36 template <class Interface, typename Event> 37 void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method)(const Event&), 38 const Event& event) 39 { 40 std::unique_lock aGuard(m_aMutex); 41 /* First get all interfaces from container with right type.*/ >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainer". 42 auto* pContainer = m_aListenerHolder.getContainer(aGuard, cppu::UnoType<Interface>::get()); 43 /* Do the follow only, if elements in container exist.*/ 44 if (!pContainer) 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; /UnoControls/source/base/multiplexer.cxx: 51 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XMouseListener, com::sun::star::awt::MouseEvent>(void (T1::*)(const T2 &), const T2 &)() 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; 48 /* Remark: The control is the event source not the peer.*/ 49 /* We must change the source of the event. */ 50 aLocalEvent.Source = m_xControl; >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_device" when calling "unlock". 51 aGuard.unlock(); 52 /* Is the control not destroyed? */ 53 if (!aLocalEvent.Source) 54 return; 55 if (!aIterator.hasMoreElements()) 56 return; /UnoControls/source/base/multiplexer.cxx: 51 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XWindowListener, com::sun::star::lang::EventObject>(void (T1::*)(const T2 &), const T2 &)() 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; 48 /* Remark: The control is the event source not the peer.*/ 49 /* We must change the source of the event. */ 50 aLocalEvent.Source = m_xControl; >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_device" when calling "unlock". 51 aGuard.unlock(); 52 /* Is the control not destroyed? */ 53 if (!aLocalEvent.Source) 54 return; 55 if (!aIterator.hasMoreElements()) 56 return; /UnoControls/source/base/multiplexer.cxx: 42 in unocontrols::OMRCListenerMultiplexerHelper::Multiplex<com::sun::star::awt::XTopWindowListener, com::sun::star::lang::EventObject>(void (T1::*)(const T2 &), const T2 &)() 36 template <class Interface, typename Event> 37 void OMRCListenerMultiplexerHelper::Multiplex(void (SAL_CALL Interface::*method)(const Event&), 38 const Event& event) 39 { 40 std::unique_lock aGuard(m_aMutex); 41 /* First get all interfaces from container with right type.*/ >>> CID 1634582: (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainer". 42 auto* pContainer = m_aListenerHolder.getContainer(aGuard, cppu::UnoType<Interface>::get()); 43 /* Do the follow only, if elements in container exist.*/ 44 if (!pContainer) 45 return; 46 comphelper::OInterfaceIteratorHelper4 aIterator(aGuard, *pContainer); 47 Event aLocalEvent = event; ** CID 1634581: Uninitialized variables (UNINIT) ________________________________________________________________________________________________________ *** CID 1634581: Uninitialized variables (UNINIT) /UnoControls/source/base/multiplexer.cxx: 126 in unocontrols::OMRCListenerMultiplexerHelper::advise(const com::sun::star::uno::Type &, const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener> &)() 120 121 void OMRCListenerMultiplexerHelper::advise( const Type& aType , 122 const Reference< XEventListener >& xListener ) 123 { 124 assert(xListener && xListener->queryInterface(aType).getValue()); 125 std::unique_lock aGuard(m_aMutex); >>> CID 1634581: Uninitialized variables (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "addInterface". 126 if (m_aListenerHolder.addInterface(aGuard, aType, xListener) == 1) 127 { 128 // the first listener is added 129 if( m_xPeer.is() ) 130 { 131 impl_adviseToPeer( m_xPeer, aType ); ** CID 1634580: Performance inefficiencies (AUTO_CAUSES_COPY) /basegfx/source/polygon/b2dpolygontools.cxx: 1134 in basegfx::utils::applyLineDashing(const basegfx::B2DPolygon &, const std::vector<double, std::allocator<double>> &, basegfx::B2DPolyPolygon *, basegfx::B2DPolyPolygon *, double)() ________________________________________________________________________________________________________ *** CID 1634580: Performance inefficiencies (AUTO_CAUSES_COPY) /basegfx/source/polygon/b2dpolygontools.cxx: 1134 in basegfx::utils::applyLineDashing(const basegfx::B2DPolygon &, const std::vector<double, std::allocator<double>> &, basegfx::B2DPolyPolygon *, basegfx::B2DPolyPolygon *, double)() 1128 if(pGapTarget) 1129 { 1130 pGapTarget->clear(); 1131 } 1132 1133 // provide callbacks as lambdas >>> CID 1634580: Performance inefficiencies (AUTO_CAUSES_COPY) >>> Using the "auto" keyword without an "&" causes the copy of an object of type "std::function<void (basegfx::B2DPolygon const &)>". 1134 const auto rLineCallback( 1135 nullptr == pLineTarget 1136 ? std::function<void(const basegfx::B2DPolygon&)>() 1137 : [&pLineTarget](const basegfx::B2DPolygon& rSnippet){ pLineTarget->append(rSnippet); }); 1138 const auto rGapCallback( 1139 nullptr == pGapTarget ** CID 1634579: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sfx2/source/doc/guisaveas.cxx: 1927 in SfxStoringHelper::FinishGUIStoreModel(std::__detail::_Node_const_iterator<std::pair<const comphelper::OUStringAndHashCode, com::sun::star::uno::Any>, (bool)0, (bool)1> &, ModelData_Impl &, bool, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &, bool, bool, bool, std::basic_string_view<char16_t, std::char_traits<char16_t>>, std::basic_string_view<char16_t, std::char_traits<char16_t>>, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &, rtl::OUString)::[lambda() (instance 1)]::operator ()() const() ________________________________________________________________________________________________________ *** CID 1634579: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sfx2/source/doc/guisaveas.cxx: 1927 in SfxStoringHelper::FinishGUIStoreModel(std::__detail::_Node_const_iterator<std::pair<const comphelper::OUStringAndHashCode, com::sun::star::uno::Any>, (bool)0, (bool)1> &, ModelData_Impl &, bool, short, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &, bool, bool, bool, std::basic_string_view<char16_t, std::char_traits<char16_t>>, std::basic_string_view<char16_t, std::char_traits<char16_t>>, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> &, rtl::OUString)::[lambda() (instance 1)]::operator ()() const() 1921 1922 if (xCert.is() && SfxViewShell::Current()) 1923 { 1924 bFoundCert = true; 1925 SfxObjectShell* pDocShell = SfxViewShell::Current()->GetObjectShell(); 1926 svl::crypto::SigningContext aSigningContext; >>> CID 1634579: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xCert" is copied in a call to copy assignment "operator =", when it could be moved instead. 1927 aSigningContext.m_xCertificate = xCert; 1928 bool bSigned = pDocShell->SignDocumentContentUsingCertificate(aSigningContext); 1929 if (bSigned && pDocShell->HasValidSignatures()) 1930 { 1931 std::unique_ptr<weld::MessageDialog> xBox( 1932 Application::CreateMessageDialog( ** CID 1634578: Performance inefficiencies (AUTO_CAUSES_COPY) /basegfx/source/polygon/b2dpolygontools.cxx: 1138 in basegfx::utils::applyLineDashing(const basegfx::B2DPolygon &, const std::vector<double, std::allocator<double>> &, basegfx::B2DPolyPolygon *, basegfx::B2DPolyPolygon *, double)() ________________________________________________________________________________________________________ *** CID 1634578: Performance inefficiencies (AUTO_CAUSES_COPY) /basegfx/source/polygon/b2dpolygontools.cxx: 1138 in basegfx::utils::applyLineDashing(const basegfx::B2DPolygon &, const std::vector<double, std::allocator<double>> &, basegfx::B2DPolyPolygon *, basegfx::B2DPolyPolygon *, double)() 1132 1133 // provide callbacks as lambdas 1134 const auto rLineCallback( 1135 nullptr == pLineTarget 1136 ? std::function<void(const basegfx::B2DPolygon&)>() 1137 : [&pLineTarget](const basegfx::B2DPolygon& rSnippet){ pLineTarget->append(rSnippet); }); >>> CID 1634578: Performance inefficiencies (AUTO_CAUSES_COPY) >>> Using the "auto" keyword without an "&" causes the copy of an object of type "std::function<void (basegfx::B2DPolygon const &)>". 1138 const auto rGapCallback( 1139 nullptr == pGapTarget 1140 ? std::function<void(const basegfx::B2DPolygon&)>() 1141 : [&pGapTarget](const basegfx::B2DPolygon& rSnippet){ pGapTarget->append(rSnippet); }); 1142 1143 // call version that uses callbacks ** CID 1634577: Uninitialized variables (UNINIT) ________________________________________________________________________________________________________ *** CID 1634577: Uninitialized variables (UNINIT) /UnoControls/source/base/multiplexer.cxx: 93 in unocontrols::OMRCListenerMultiplexerHelper::setPeer(const com::sun::star::uno::Reference<com::sun::star::awt::XWindow> &)() 87 if( m_xPeer == xPeer ) 88 return; 89 90 if( m_xPeer.is() ) 91 { 92 // get all types from the listener added to the peer >>> CID 1634577: Uninitialized variables (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "getContainedTypes". 93 const std::vector< Type > aContainedTypes = m_aListenerHolder.getContainedTypes(aGuard); 94 // loop over all listener types and remove the listeners from the peer 95 for( const auto& rContainedType : aContainedTypes ) 96 impl_unadviseFromPeer( m_xPeer, rContainedType ); 97 } 98 m_xPeer = xPeer; ** CID 1634576: Concurrent data access violations (MISSING_LOCK) /svx/source/unodraw/unoshcol.cxx: 44 in SvxShapeCollection::release()() ________________________________________________________________________________________________________ *** CID 1634576: Concurrent data access violations (MISSING_LOCK) /svx/source/unodraw/unoshcol.cxx: 44 in SvxShapeCollection::release()() 38 { 39 uno::Reference< uno::XInterface > x( xDelegator ); 40 if (! x.is()) 41 { 42 if (osl_atomic_decrement( &m_refCount ) == 0) 43 { >>> CID 1634576: Concurrent data access violations (MISSING_LOCK) >>> Accessing "this->bDisposed" without holding lock "SvxShapeCollection.m_aMutex". Elsewhere, "SvxShapeCollection.bDisposed" is written to with "SvxShapeCollection.m_aMutex" held 1 out of 1 times. 44 if (! bDisposed) 45 { 46 uno::Reference< uno::XInterface > xHoldAlive( getXWeak() ); 47 // First dispose 48 try 49 { ** CID 1634575: Memory - illegal accesses (UNINIT) ________________________________________________________________________________________________________ *** CID 1634575: Memory - illegal accesses (UNINIT) /UnoControls/source/base/multiplexer.cxx: 116 in unocontrols::OMRCListenerMultiplexerHelper::disposeAndClear()() 110 111 void OMRCListenerMultiplexerHelper::disposeAndClear() 112 { 113 std::unique_lock aGuard(m_aMutex); 114 EventObject aEvent; 115 aEvent.Source = m_xControl; >>> CID 1634575: Memory - illegal accesses (UNINIT) >>> Using uninitialized value "aGuard._M_owns" when calling "disposeAndClear". 116 m_aListenerHolder.disposeAndClear(aGuard, aEvent); 117 } 118 119 // container method 120 121 void OMRCListenerMultiplexerHelper::advise( const Type& aType , ** CID 1634574: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sfx2/source/doc/objserv.cxx: 2201 in SfxObjectShell::ResignDocument(com::sun::star::uno::Sequence<com::sun::star::security::DocumentSignatureInformation> &)() ________________________________________________________________________________________________________ *** CID 1634574: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) /sfx2/source/doc/objserv.cxx: 2201 in SfxObjectShell::ResignDocument(com::sun::star::uno::Sequence<com::sun::star::security::DocumentSignatureInformation> &)() 2195 for (auto & rInfo : rSignaturesInfo) 2196 { 2197 auto xCert = rInfo.Signer; 2198 if (xCert.is()) 2199 { 2200 svl::crypto::SigningContext aSigningContext; >>> CID 1634574: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "xCert" is copied in a call to copy assignment "operator =", when it could be moved instead. 2201 aSigningContext.m_xCertificate = xCert; 2202 bSignSuccess &= SignDocumentContentUsingCertificate(aSigningContext); 2203 } 2204 } 2205 2206 return bSignSuccess; ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DnQE7_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtNjyLDdUug5972fAs8yHneovNChiuHedKGwIDfqzXmDDm6e1l7AYY-2ByjJa9L8-2BT76YhzsUcFJdAXV6jKckVapy4ZTxIPpmC1eE9KC8LvybuBedEuvNTvsr4HuIEyvJcewPxk098YLnPkSYrY74uMxM9H5SVMmC57Qx6CwP5Bceak-3D