summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-18 20:21:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-18 20:28:33 +0000
commitf7f5fa0d36571b5103a54ed1281668cd23c4ecbc (patch)
tree70ca9a7152fd612e4c6f3f65512a4da43e438383 /sc
parent535ad5b239b6daa61c5fbaf6b644f66640b923b8 (diff)
coverity#1267652 Logically dead code
Change-Id: Ie36cf4193d2e202894e378b0094d399267291023
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/formulacell.cxx4
-rw-r--r--sc/source/core/tool/grouparealistener.cxx6
2 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index d37b17763e8e..2d3522d5dacd 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3882,9 +3882,11 @@ bool ScFormulaCell::InterpretInvariantFormulaGroup()
ScAddress aTmpPos = aPos;
aTmpPos.SetRow(mxGroup->mpTopCell->aPos.Row() + i);
ScFormulaCell* pCell = pDocument->GetFormulaCell(aTmpPos);
- assert( pCell != NULL );
if (!pCell)
+ {
+ SAL_WARN("sc", "GetFormulaCell not found");
continue;
+ }
// FIXME: this set of horrors is unclear to me ... certainly
// the above GetCell is profoundly nasty & slow ...
diff --git a/sc/source/core/tool/grouparealistener.cxx b/sc/source/core/tool/grouparealistener.cxx
index 6ff467c89ee7..17aa26a71b9c 100644
--- a/sc/source/core/tool/grouparealistener.cxx
+++ b/sc/source/core/tool/grouparealistener.cxx
@@ -188,9 +188,11 @@ void FormulaGroupAreaListener::collectFormulaCells(
" mnTopCellRow " << mnTopCellRow << " length " << mnGroupLen);
ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( mnTopCellRow);
- assert(pp);
if (!pp)
+ {
+ SAL_WARN("sc", "GetFormulaCellBlockAddress not found");
return;
+ }
ScFormulaCell* const * ppEnd = pp + mnGroupLen;
@@ -281,7 +283,7 @@ ScAddress FormulaGroupAreaListener::getTopCellPos() const
const ScFormulaCell* FormulaGroupAreaListener::getTopCell() const
{
const ScFormulaCell* const * pp = mpColumn->GetFormulaCellBlockAddress( mnTopCellRow);
- assert(pp);
+ SAL_WARN_IF(!pp, "sc", "GetFormulaCellBlockAddress not found");
return pp ? *pp : NULL;
}