diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-10 09:24:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-06-06 14:15:43 +0200 |
commit | d0069e5189f5410e1db7aa395f0754109e872f46 (patch) | |
tree | 30c860e8d780c3461c6048be9594f642f03de5de /sw | |
parent | cc2db25645ede743bdc3824fe7d26ea4beda6a96 (diff) |
add COVERITY_NOEXCEPT_FALSE
to markup dtors that coverity warns might throw exceptions
which won't throw in practice, or where std::terminate is
an acceptable response if they do
Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4
Reviewed-on: https://gerrit.libreoffice.org/38318
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/calbck.hxx | 2 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 4 | ||||
-rw-r--r-- | sw/inc/ndole.hxx | 2 | ||||
-rw-r--r-- | sw/inc/ring.hxx | 2 | ||||
-rw-r--r-- | sw/inc/unobaseclass.hxx | 2 | ||||
-rw-r--r-- | sw/inc/unochart.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/edws.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/inc/frmtool.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/possiz.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/undo/docundo.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unochart.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/move.cxx | 2 |
17 files changed, 25 insertions, 19 deletions
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx index a6f07772c045..bfae004e9e57 100644 --- a/sw/inc/calbck.hxx +++ b/sw/inc/calbck.hxx @@ -86,7 +86,7 @@ namespace sw WriterListener() : m_pLeft(nullptr), m_pRight(nullptr) {} - virtual ~WriterListener() {}; + virtual ~WriterListener() COVERITY_NOEXCEPT_FALSE {} virtual void SwClientNotify( const SwModify&, const SfxHint& rHint) =0; public: bool IsLast() const { return !m_pLeft && !m_pRight; } diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index 6f3669a95ba1..1bc5c1b0eec5 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -962,7 +962,7 @@ class SwActContext { SwEditShell & m_rShell; public: SwActContext(SwEditShell *pShell); - ~SwActContext(); + ~SwActContext() COVERITY_NOEXCEPT_FALSE; }; /// Class for automated call of Start- and EndCursorMove(). @@ -970,7 +970,7 @@ class SwMvContext { SwEditShell & m_rShell; public: SwMvContext(SwEditShell *pShell); - ~SwMvContext(); + ~SwMvContext() COVERITY_NOEXCEPT_FALSE; }; #endif diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx index c878689b78eb..86e0798a5697 100644 --- a/sw/inc/ndole.hxx +++ b/sw/inc/ndole.hxx @@ -54,7 +54,7 @@ class SW_DLLPUBLIC SwOLEObj public: SwOLEObj( const svt::EmbeddedObjectRef& pObj ); SwOLEObj( const OUString &rName, sal_Int64 nAspect ); - ~SwOLEObj(); + ~SwOLEObj() COVERITY_NOEXCEPT_FALSE; bool UnloadObject(); static bool UnloadObject( css::uno::Reference< css::embed::XEmbeddedObject > const & xObj, diff --git a/sw/inc/ring.hxx b/sw/inc/ring.hxx index a03db4c68cee..79a1c93fb82d 100644 --- a/sw/inc/ring.hxx +++ b/sw/inc/ring.hxx @@ -42,7 +42,7 @@ namespace sw typedef typename std::add_const<value_type>::type const_value_type; typedef RingContainer<value_type> ring_container; typedef RingContainer<const_value_type> const_ring_container; - virtual ~Ring() + virtual ~Ring() COVERITY_NOEXCEPT_FALSE { unlink(); }; /** algo::unlink is buggy! don't call it directly! */ void unlink() diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx index f72f07d5c83a..d03a5dd37ca5 100644 --- a/sw/inc/unobaseclass.hxx +++ b/sw/inc/unobaseclass.hxx @@ -66,7 +66,7 @@ private: public: UnoActionContext(SwDoc *const pDoc); - ~UnoActionContext(); + ~UnoActionContext() COVERITY_NOEXCEPT_FALSE; }; /* diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx index 38e3b34e6a2c..6b57b32ac708 100644 --- a/sw/inc/unochart.hxx +++ b/sw/inc/unochart.hxx @@ -87,7 +87,7 @@ class SwChartLockController_Helper public: SwChartLockController_Helper( SwDoc *pDocument ); - ~SwChartLockController_Helper(); + ~SwChartLockController_Helper() COVERITY_NOEXCEPT_FALSE; void StartOrContinueLocking(); void Disconnect(); diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index cbda86ddf3eb..685c37c7ec56 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -149,7 +149,7 @@ SwActContext::SwActContext(SwEditShell *pShell) m_rShell.StartAction(); } -SwActContext::~SwActContext() +SwActContext::~SwActContext() COVERITY_NOEXCEPT_FALSE { m_rShell.EndAction(); } @@ -160,7 +160,7 @@ SwMvContext::SwMvContext(SwEditShell *pShell) m_rShell.SttCursorMove(); } -SwMvContext::~SwMvContext() +SwMvContext::~SwMvContext() COVERITY_NOEXCEPT_FALSE { m_rShell.EndCursorMove(); } diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx index b9093eb523c5..2f4f2d8d9e6c 100644 --- a/sw/source/core/inc/frmtool.hxx +++ b/sw/source/core/inc/frmtool.hxx @@ -184,7 +184,7 @@ protected: public: SwFrameNotify( SwFrame *pFrame ); - ~SwFrameNotify(); + ~SwFrameNotify() COVERITY_NOEXCEPT_FALSE; const SwRect &Frame() const { return maFrame; } void SetInvaKeep() { mbInvaKeep = true; } diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index acd518932a47..1ebc28a52498 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -99,7 +99,7 @@ SwFrameNotify::SwFrameNotify( SwFrame *pF ) : mbHadFollow = pF->IsContentFrame() && static_cast<SwContentFrame*>(pF)->GetFollow(); } -SwFrameNotify::~SwFrameNotify() +SwFrameNotify::~SwFrameNotify() COVERITY_NOEXCEPT_FALSE { SwRectFnSet aRectFnSet(mpFrame); const bool bAbsP = aRectFnSet.PosDiff(maFrame, mpFrame->Frame()); diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index aa7449a6a1ec..1f6d5ce52f23 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -761,7 +761,7 @@ SwOLEObj::SwOLEObj( const OUString &rString, sal_Int64 nAspect ) : xOLERef.SetViewAspect( nAspect ); } -SwOLEObj::~SwOLEObj() +SwOLEObj::~SwOLEObj() COVERITY_NOEXCEPT_FALSE { if(m_pDeflateData) { diff --git a/sw/source/core/text/possiz.hxx b/sw/source/core/text/possiz.hxx index 4c59142f9ce4..e256494911e3 100644 --- a/sw/source/core/text/possiz.hxx +++ b/sw/source/core/text/possiz.hxx @@ -38,6 +38,12 @@ public: ,nHeight(sal_uInt16(rSize.Height())) { } +#if defined(__COVERITY__) + ~SwPosSize() COVERITY_NOEXCEPT_FALSE {} + SwPosSize(const SwPosSize&) = default; + SwPosSize(SwPosSize&&) = default; + SwPosSize& operator=(SwPosSize&&) = default; +#endif sal_uInt16 Height() const { return nHeight; } void Height( const sal_uInt16 nNew ) { nHeight = nNew; } sal_uInt16 Width() const { return nWidth; } diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx index 63cff9f61230..4c09fa2b1048 100644 --- a/sw/source/core/undo/docundo.cxx +++ b/sw/source/core/undo/docundo.cxx @@ -546,7 +546,7 @@ public: m_rShell.Push(); // prevent modification of current cursor } } - ~CursorGuard() + ~CursorGuard() COVERITY_NOEXCEPT_FALSE { if (m_bSaveCursor) { diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index aebcff0a7700..c29296165256 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -92,7 +92,7 @@ SwChartLockController_Helper::SwChartLockController_Helper( SwDoc *pDocument ) : aUnlockTimer.SetDebugName( "sw::SwChartLockController_Helper aUnlockTimer" ); } -SwChartLockController_Helper::~SwChartLockController_Helper() +SwChartLockController_Helper::~SwChartLockController_Helper() COVERITY_NOEXCEPT_FALSE { if (pDoc) // still connected? Disconnect(); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 53800f99400a..493470b5cd5d 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -248,7 +248,7 @@ UnoActionContext::UnoActionContext(SwDoc *const pDoc) } } -UnoActionContext::~UnoActionContext() +UnoActionContext::~UnoActionContext() COVERITY_NOEXCEPT_FALSE { // Doc may already have been removed here if (m_pDoc) diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index b694ca7f0a51..55dab8a712ad 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -93,7 +93,7 @@ class SwImplShellAction CurrShell* pCurrSh; public: explicit SwImplShellAction( SwDoc& rDoc ); - ~SwImplShellAction(); + ~SwImplShellAction() COVERITY_NOEXCEPT_FALSE; SwImplShellAction(const SwImplShellAction&) = delete; SwImplShellAction& operator=(const SwImplShellAction&) = delete; }; @@ -113,7 +113,7 @@ SwImplShellAction::SwImplShellAction( SwDoc& rDoc ) } } -SwImplShellAction::~SwImplShellAction() +SwImplShellAction::~SwImplShellAction() COVERITY_NOEXCEPT_FALSE { if( pCurrSh ) { diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index edcad002edc8..0dd00ae68382 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -192,7 +192,7 @@ public: pSh->DelRight(); pSh->StartAllAction(); } - ~SwTrnsfrActionAndUndo() + ~SwTrnsfrActionAndUndo() COVERITY_NOEXCEPT_FALSE { pSh->EndUndo(); pSh->EndAllAction(); diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx index 34ac8058f95e..5612f5f856b9 100644 --- a/sw/source/uibase/wrtsh/move.cxx +++ b/sw/source/uibase/wrtsh/move.cxx @@ -48,7 +48,7 @@ public: ( pSh = pWrtSh )->MoveCursor( bSel ); pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK); } - ~ShellMoveCursor() + ~ShellMoveCursor() COVERITY_NOEXCEPT_FALSE { if( bAct ) { |