diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-11-22 15:51:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-11-22 21:02:07 +0100 |
commit | 3afe0c79fa185a6fe01c48e427c49b12728e8c4a (patch) | |
tree | 6d27b17a476ca075f04d2ea419f3441988601e19 | |
parent | f19dfaf817556ba28d68c000f3561a2752635727 (diff) |
--enable-dbgutil --disable-assert-always-abort fixes
...which <https://ci.libreoffice.org/job/lo_tb_random_config_linux/>
occasionally stumbles across; plus some related loplugin:staticmethods fixes
Change-Id: If6998c302cfbabfcad626d9c68d94d3368548a41
Reviewed-on: https://gerrit.libreoffice.org/63808
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | chart2/source/controller/sidebar/ChartAxisPanel.cxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/sidebar/ChartErrorBarPanel.cxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/sidebar/ChartSeriesPanel.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/model.cxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/model.hxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/bastyp/swcache.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 2 |
8 files changed, 11 insertions, 11 deletions
diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.cxx b/chart2/source/controller/sidebar/ChartAxisPanel.cxx index 04e32abd392e..a5669926a182 100644 --- a/chart2/source/controller/sidebar/ChartAxisPanel.cxx +++ b/chart2/source/controller/sidebar/ChartAxisPanel.cxx @@ -170,7 +170,7 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel) assert(aAny.hasValue()); OUString aCID; aAny >>= aCID; -#ifdef DBG_UTIL +#if defined DBG_UTIL && !defined NDEBUG ObjectType eType = ObjectIdentifier::getObjectType(aCID); assert(eType == OBJECTTYPE_AXIS); #endif diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx index 2d1a911f69af..4cc0d079fcd0 100644 --- a/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx +++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.cxx @@ -227,7 +227,7 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel) assert(aAny.hasValue()); OUString aCID; aAny >>= aCID; -#ifdef DBG_UTIL +#if defined DBG_UTIL && !defined NDEBUG ObjectType eType = ObjectIdentifier::getObjectType(aCID); assert(eType == OBJECTTYPE_DATA_ERRORS_X || eType == OBJECTTYPE_DATA_ERRORS_Y || diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx index ec6ddb944513..c2a6a4afade0 100644 --- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx +++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx @@ -272,7 +272,7 @@ OUString getCID(const css::uno::Reference<css::frame::XModel>& xModel) if (aCID.isEmpty()) return OUString(); -#ifdef DBG_UTIL +#if defined DBG_UTIL && !defined NDEBUG ObjectType eType = ObjectIdentifier::getObjectType(aCID); assert(eType == OBJECTTYPE_DATA_SERIES); #endif diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 2d90be996619..f0051df277ba 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -65,7 +65,7 @@ using namespace com::sun::star::xml::dom; using namespace xforms; -#if OSL_DEBUG_LEVEL > 0 +#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG #define DBG_INVARIANT_TYPE(TYPE) class DBG_##TYPE { const TYPE* mpT; void check() { mpT->dbg_assertInvariant(); } public: DBG_##TYPE(const TYPE* pT) : mpT(pT) { check(); } ~DBG_##TYPE() { check(); } } _DBG_##TYPE(this); #define DBG_INVARIANT() DBG_INVARIANT_TYPE(Model) @@ -177,7 +177,7 @@ void Model::setExternalData( bool _bData ) mbExternalData = _bData; } -#if OSL_DEBUG_LEVEL > 0 +#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG void Model::dbg_assertInvariant() const { assert(mxInstances && "no instances found"); diff --git a/forms/source/xforms/model.hxx b/forms/source/xforms/model.hxx index d64f28e01853..df08dee8ab48 100644 --- a/forms/source/xforms/model.hxx +++ b/forms/source/xforms/model.hxx @@ -139,7 +139,7 @@ public: void setExternalData( bool _bData ); -#if OSL_DEBUG_LEVEL > 0 +#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG void dbg_assertInvariant() const; #endif diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 6f82740d3b38..5b20269528a4 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -1457,13 +1457,13 @@ class RecursionCounter { ScRecursionHelper& rRec; bool bStackedInIteration; -#ifdef DBG_UTIL +#if defined DBG_UTIL && !defined NDEBUG const ScFormulaCell* cell; #endif public: RecursionCounter( ScRecursionHelper& r, ScFormulaCell* p ) : rRec(r) -#ifdef DBG_UTIL +#if defined DBG_UTIL && !defined NDEBUG , cell(p) #endif { @@ -1477,7 +1477,7 @@ public: rRec.DecRecursionCount(); if (bStackedInIteration) { -#ifdef DBG_UTIL +#if defined DBG_UTIL && !defined NDEBUG assert(rRec.GetRecursionInIterationStack().top() == cell); #endif rRec.GetRecursionInIterationStack().pop(); diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index 74511a554cbf..2693578c8b21 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -58,7 +58,7 @@ void SwCache::Check() assert(pObj == m_pLast); } pObj = pObj->GetNext(); - assert(pObj != pOldRealFirst); + assert(pObj != pOldRealFirst); (void) pOldRealFirst; } assert(bFirstFound); SAL_WARN_IF( nCnt + m_aFreePositions.size() != size(), "sw.core", "Lost Chain." ); diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index d3e640531f79..d5e368c8fe77 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1573,7 +1573,7 @@ SwRect SwTextFrame::SmartTagScan(SwTextNode & rNode) void SwTextFrame::CollectAutoCmplWrds(SwTextNode & rNode, sal_Int32 nActPos) { - assert(sw::FrameContainsNode(*this, rNode.GetIndex())); + assert(sw::FrameContainsNode(*this, rNode.GetIndex())); (void) this; SwTextNode *const pNode(&rNode); if (!nActPos) nActPos = COMPLETE_STRING; |