summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-02-07 11:55:24 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-02-11 07:07:30 +0100
commit121182bddbce8f14cccdf7db9af8c08867a0912f (patch)
treedbad1ab9b7a4a4ea0f5862ae1a8679aa117c8829 /sc
parent6e8c9bdf0a55141d3cbd181862aec89b788bb060 (diff)
tdf#120703 PVS: V560 A part of conditional expression is always true/false
Change-Id: I67462369d93e9d9ff3c056800947c4b75f71ba5f Reviewed-on: https://gerrit.libreoffice.org/67486 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/ucalc.cxx2
-rw-r--r--sc/source/ui/dbgui/tpsubt.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 85e5f3b5a520..bfb780a8e172 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4717,7 +4717,7 @@ void Test::testAutoFill()
{
ASSERT_DOUBLES_EQUAL(static_cast<double>(i+1), m_pDoc->GetValue(i, 0, 0));
}
- else if (j == 1 || j== 2)
+ else // j == 1 || j == 2
{
if(i == 0)
ASSERT_DOUBLES_EQUAL(10.0, m_pDoc->GetValue(0,j,0));
diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 8d02700b866b..063be3a26fd4 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -156,7 +156,7 @@ bool ScTpSubTotalGroup::DoReset( sal_uInt16 nGroupNo,
mpLbColumns->CheckEntryPos( nCheckPos );
*pFunction = FuncToLbPos( pFunctions[i] );
- if (i == 0 || (i > 0 && nCheckPos < nFirstChecked))
+ if (i == 0 || nCheckPos < nFirstChecked)
nFirstChecked = nCheckPos;
}
// Select the first checked field from the top.