sw/source/core/text/guess.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 80c5e962fd22a6d1ddcc460ba60b0b775b303f0e Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Mon May 30 16:41:17 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Mon May 30 19:47:11 2022 +0200 -Werror=maybe-uninitialized > sw/source/core/text/guess.cxx: In member function ‘bool SwTextGuess::Guess(const SwTextPortion&, SwTextFormatInfo&, sal_uInt16)’: > sw/source/core/text/guess.cxx:220:37: error: ‘bHyphenationNoLastWord’ may be used uninitialized [-Werror=maybe-uninitialized] > 220 | if ( bHyphenationNoLastWord && sal_Int32(m_nCutPos) > nLastWord ) > | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > sw/source/core/text/guess.cxx:201:14: note: ‘bHyphenationNoLastWord’ was declared here > 201 | bool bHyphenationNoLastWord; > | ^~~~~~~~~~~~~~~~~~~~~~ since 8c018910ae4d8701b1ce2a95727b9baed4016da3 "tdf#149248 sw offapi xmloff: add option to not hyphenate last word" Change-Id: Id3be25bf9f5d6769555bfe461a0f4e1e27e0e39e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135137 Reviewed-by: László Németh <nem...@numbertext.org> Tested-by: Jenkins diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index 907502ed0063..d2711d4087d2 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -198,7 +198,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, { // search start of the last word, if needed sal_Int32 nLastWord = rInf.GetText().getLength() - 1; - bool bHyphenationNoLastWord; + bool bHyphenationNoLastWord = false; const css::beans::PropertyValues & rHyphValues = rInf.GetHyphValues(); assert( rHyphValues.getLength() > 3 && rHyphValues[3].Name == UPN_HYPH_NO_LAST_WORD ); if ( rHyphValues[3].Value >>= bHyphenationNoLastWord )