diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-19 15:07:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-19 21:19:21 +0100 |
commit | cce17de6e7736341056604fc391c78295b097a7d (patch) | |
tree | a8f52d5262cc191b615949a43a691ee0b89a4894 /sc/source/ui/StatisticsDialogs | |
parent | 864c129a7714085d371c2b127cbc8e5c862347e6 (diff) |
coverity#1430077 add assert for 'Division or modulo by zero'
and
coverity#1430076 Division or modulo by zero
coverity#1430078 Division or modulo by float zero
coverity#1430082 Division or modulo by float zero
coverity#1430083 Division or modulo by zero
coverity#1430085 Division or modulo by zero
coverity#1430102 Division or modulo by zero
coverity#1430103 Division or modulo by zero
Change-Id: I9d7190f95d19a755c681f1f897a8921105ef7c46
Reviewed-on: https://gerrit.libreoffice.org/51568
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 'sc/source/ui/StatisticsDialogs')
-rw-r--r-- | sc/source/ui/StatisticsDialogs/SamplingDialog.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index 42887148cf8d..46a317b22627 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -201,6 +201,7 @@ ScRange ScSamplingDialog::PerformPeriodicSampling(ScDocShell* pDocShell) outRow = mOutputAddress.Row(); for (SCROW inRow = aStart.Row(); inRow <= aEnd.Row(); inRow++) { + assert(aPeriod && "div-by-zero"); if (i % aPeriod == aPeriod - 1 ) // Sample the last of period { double aValue = mDocument->GetValue(ScAddress(inCol, inRow, inTab)); |