diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-08 09:29:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-08 09:29:46 +0200 |
commit | d4936e876b1b965505ee2e82efaa35eef65d2135 (patch) | |
tree | 7c0e0290091cb5bb3f0a62f584ae960d029a55f5 | |
parent | 98be23b2e6f4e62a0d3681996cdcacb0f7fa16c4 (diff) |
Silence false MSVC C4701 warning
...about use of potentially uninitialized aRowHeightRange.mnValue in
nSum += aRowHeightRange.mnValue;
Assuming it is indeed a false warning, as
if (aRowHeightRange.mnRow2 < nRow)
will be entered on the first round through the for-loop, and the call to
if (!mpRowHeights->getRangeData(nRow, aRowHeightRange))
will then probably initialize aRowHeightRange.mnValue
Change-Id: I6f942884386e2a9ed5d215bbd183ed584d254658
-rw-r--r-- | sc/source/core/data/table2.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 7925af683a81..4afc04c741ec 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -3679,6 +3679,7 @@ SCROW ScTable::GetRowForHeight(sal_uLong nHeight) const ScFlatUInt16RowSegments::RangeData aRowHeightRange; aRowHeightRange.mnRow2 = -1; + aRowHeightRange.mnValue = 0; // silence MSVC C4701 for (SCROW nRow = 0; nRow <= MAXROW; ++nRow) { |