svx/source/form/formcontrolling.cxx | 1 + 1 file changed, 1 insertion(+)
New commits: commit 13bbabd0a7d52b8a823f9fce704c32818b44ceb3 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Sun May 22 13:25:50 2022 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Tue Jun 7 17:34:57 2022 +0200 svx: work around GCC12 spurious -Werror=stringop-overflow /usr/include/c++/12/bits/stl_algobase.h:431:30: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ writing 1 or more bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] Change-Id: Ib581b5788ff5d363b688000e700a42074c3b78eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134740 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit d37486537e7d404b19acdfaec358cb0ad706940c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134633 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index 456e5a88ffbf..221ae3584f21 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -425,6 +425,7 @@ namespace svx SID_FM_VIEW_AS_GRID }; sal_Int32 nFeatureCount = SAL_N_ELEMENTS( pSupportedFeatures ); + aSupportedFeatures.reserve(nFeatureCount); // work around GCC12 spurious -Werror=stringop-overflow= aSupportedFeatures.insert( aSupportedFeatures.begin(), pSupportedFeatures, pSupportedFeatures + nFeatureCount ); m_pInvalidationCallback->invalidateFeatures( aSupportedFeatures );