[Libreoffice-commits] core.git: chart2/source forms/source sc/source sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Nov 22 20:02:34 UTC 2018


 chart2/source/controller/sidebar/ChartAxisPanel.cxx     |    2 +-
 chart2/source/controller/sidebar/ChartErrorBarPanel.cxx |    2 +-
 chart2/source/controller/sidebar/ChartSeriesPanel.cxx   |    2 +-
 forms/source/xforms/model.cxx                           |    4 ++--
 forms/source/xforms/model.hxx                           |    2 +-
 sc/source/core/data/formulacell.cxx                     |    6 +++---
 sw/source/core/bastyp/swcache.cxx                       |    2 +-
 sw/source/core/txtnode/txtedt.cxx                       |    2 +-
 8 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 3afe0c79fa185a6fe01c48e427c49b12728e8c4a
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 22 15:51:18 2018 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Nov 22 21:02:07 2018 +0100

    --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 at redhat.com>

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;


More information about the Libreoffice-commits mailing list