[Libreoffice-commits] core.git: sc/source
Stephan Bergmann
sbergman at redhat.com
Sat Oct 8 07:34:19 UTC 2016
sc/source/core/data/table2.cxx | 1 +
1 file changed, 1 insertion(+)
New commits:
commit d4936e876b1b965505ee2e82efaa35eef65d2135
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Sat Oct 8 09:29:46 2016 +0200
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
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 7925af6..4afc04c 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)
{
More information about the Libreoffice-commits
mailing list