summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-05-22 13:50:11 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-06-07 17:35:30 +0200
commit21e0122310dedf3b33144cc77f880ec51446186b (patch)
tree8030f2f98fb316dfa38647386b52f11776d86620 /sc
parent13bbabd0a7d52b8a823f9fce704c32818b44ceb3 (diff)
sw: SwNodeIndex GCC12 spurious -Werror=dangling-pointer=
It doesn't understand that ~SwNodeIndex() will remove the pointer, which is obfuscated by over-boostified code. In member function ‘void SwNodeIndex::RegisterIndex(SwNodes&)’, inlined from ‘SwNodeIndex::SwNodeIndex(SwNodes&, SwNodeOffset)’ at sw/inc/ndindex.hxx:54:22, inlined from ‘bool SwNodes::InsBoxen(SwTableNode*, SwTableLine*, SwTableBoxFormat*, SwTextFormatColl*, const SfxItemSet*, sal_uInt16, sal_uInt16)’ at sw/source/core/docnode/ndtbl.cxx:301:41: sw/inc/ndindex.hxx:37:31: error: storing the address of local variable ‘aEndIdx’ in ‘*this.SwNodes::m_vIndices’ [-Werror=dangling-pointer=] 37 | rNodes.m_vIndices = this; | ~~~~~~~~~~~~~~~~~~^~~~~~ sw/source/core/docnode/ndtbl.cxx: In member function ‘bool SwNodes::InsBoxen(SwTableNode*, SwTableLine*, SwTableBoxFormat*, SwTextFormatColl*, const SfxItemSet*, sal_uInt16, sal_uInt16)’: sw/source/core/docnode/ndtbl.cxx:301:17: note: ‘aEndIdx’ declared here 301 | SwNodeIndex aEndIdx( *this, nIdxPos ); | ^~~~~~~ sw/source/core/docnode/ndtbl.cxx:301:17: note: ‘<unknown>’ declared here Change-Id: I3f24cd8e3e0b1fd0a0943150d3d83d09f2c984fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134741 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 486991b8ec2b63324c8cf5a26e9091942c24b3d9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134774 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sc')
0 files changed, 0 insertions, 0 deletions