New Defects reported by Coverity Scan for LibreOffice
scan-admin at coverity.com
scan-admin at coverity.com
Thu Nov 21 07:06:39 UTC 2024
Hi,
Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan.
4 new defect(s) introduced to LibreOffice found with Coverity Scan.
New defect(s) Reported-by: Coverity Scan
Showing 4 of 4 defect(s)
** CID 1634867: Uninitialized variables (USE_AFTER_MOVE)
/svl/source/misc/sharedstringpool.cxx: 27 in <unnamed>::StringWithHash::StringWithHash(rtl::OUString)()
________________________________________________________________________________________________________
*** CID 1634867: Uninitialized variables (USE_AFTER_MOVE)
/svl/source/misc/sharedstringpool.cxx: 27 in <unnamed>::StringWithHash::StringWithHash(rtl::OUString)()
21 struct StringWithHash
22 {
23 OUString str;
24 sal_Int32 hashCode;
25 StringWithHash(OUString s)
26 : str(std::move(s))
>>> CID 1634867: Uninitialized variables (USE_AFTER_MOVE)
>>> "s" is used after it has been already moved.
27 , hashCode(s.hashCode())
28 {
29 }
30
31 bool operator==(StringWithHash const& rhs) const
32 {
** CID 1634866: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/include/svl/lstner.hxx: 43 in ()
________________________________________________________________________________________________________
*** CID 1634866: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/include/svl/lstner.hxx: 43 in ()
37 //listener should only be added once and duplicates are
38 //unexpected. In dbgutil mode this tracks where the original
39 //listener was added from and reports the duplicate addition
40 //as an error
41 enum class DuplicateHandling { Unexpected, Prevent, Allow };
42
>>> CID 1634866: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "SfxListener" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
43 class SVL_DLLPUBLIC SfxListener
44 {
45 std::vector<SfxBroadcaster*> maBCs;
46 #ifdef DBG_UTIL
47 std::map<SfxBroadcaster*, std::unique_ptr<sal::BacktraceState>>
48 maCallStacks;
** CID 1634865: Uninitialized members (UNINIT_CTOR)
/sw/source/core/text/porlin.hxx: 213 in SwLinePortion::SwLinePortion(const SwLinePortion&)()
________________________________________________________________________________________________________
*** CID 1634865: Uninitialized members (UNINIT_CTOR)
/sw/source/core/text/porlin.hxx: 213 in SwLinePortion::SwLinePortion(const SwLinePortion&)()
207 m_bJoinBorderWithPrev( rPortion.m_bJoinBorderWithPrev ),
208 m_bJoinBorderWithNext( rPortion.m_bJoinBorderWithNext ),
209 m_nExtraBlankWidth(rPortion.m_nExtraBlankWidth),
210 m_nExtraShrunkWidth(rPortion.m_nExtraShrunkWidth),
211 m_nLayoutContext(rPortion.m_nLayoutContext)
212 {
>>> CID 1634865: Uninitialized members (UNINIT_CTOR)
>>> Non-static class member "m_bIsFieldmarkText" is not initialized in this constructor nor in any functions that it calls.
213 }
214
215 inline void SwLinePortion::Truncate()
216 {
217 if ( mpNextPortion )
218 Truncate_();
219 }
220
** CID 1634864: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sw/inc/unocrsr.hxx: 107 in ()
________________________________________________________________________________________________________
*** CID 1634864: Low impact quality (MISSING_MOVE_ASSIGNMENT)
/sw/inc/unocrsr.hxx: 107 in ()
101 SwCursor& GetSelRing() { return m_aTableSel; }
102 const SwCursor& GetSelRing() const { return m_aTableSel; }
103 };
104
105 namespace sw
106 {
>>> CID 1634864: Low impact quality (MISSING_MOVE_ASSIGNMENT)
>>> Class "sw::UnoCursorPointer" may benefit from adding a move assignment operator. See other events which show the copy assignment operator being applied to rvalues, where a move assignment may be faster.
107 class UnoCursorPointer final : public SfxListener
108 {
109 public:
110 UnoCursorPointer()
111 {}
112 UnoCursorPointer(std::shared_ptr<SwUnoCursor> pCursor)
________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3DW3lD_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtPO-2B5dJ1nwhgdjjX8R9IGcsMU-2F3gPYkK5mJRyWw6AZ9C70gQ6p3T-2FzBftpYWM14XdUV8TkZRgP0InUjMfwBC4bw72xeTJMhGHEf6b1bvOHgeDVdRzi16jIVRuhwo7qn26oma9WydOJe-2Fz6WiPagUTktz99zAxYGtaZvWV3cf0D9E-3D
More information about the LibreOffice
mailing list