From d4936e876b1b965505ee2e82efaa35eef65d2135 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sat, 8 Oct 2016 09:29:46 +0200 Subject: 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 --- sc/source/core/data/table2.cxx | 1 + 1 file changed, 1 insertion(+) 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) { -- cgit