sc/source/core/tool/dbdata.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 25b977b0502b6b84596f57d03862cdba9ca760dc Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon Mar 28 17:21:38 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon Mar 28 23:30:22 2022 +0200 -Werror,-Wunused-but-set-variable ...ever since bc712935a05dd34142b4c17dd6686761d9b9d5e1 "TableRef: refresh table column names before saving" Change-Id: I7537fa3632ff03f73d36eaf9fc6ba0ab73319cab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132232 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index b62d3b76b8bf..f7e22dea2a03 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -813,7 +813,7 @@ void ScDBData::RefreshTableColumnNames( ScDocument* pDoc ) ScRefCellValue* pCell; SCCOL nCol, nLastColFilled = nStartCol - 1; SCROW nRow; - for (size_t i=0; (pCell = aIter.GetNext( nCol, nRow)) != nullptr; ++i) + while ((pCell = aIter.GetNext( nCol, nRow)) != nullptr) { if (pCell->hasString()) {