summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-05-22 13:25:50 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-06-07 17:34:57 +0200
commit13bbabd0a7d52b8a823f9fce704c32818b44ceb3 (patch)
treef089afce00b67535d33165bcf7b945782d181bf0
parentvcl: WhitespaceToSpace() spurious -Werror=maybe-uninitialized (diff)
downloadcore-13bbabd0a7d52b8a823f9fce704c32818b44ceb3.tar.gz
core-13bbabd0a7d52b8a823f9fce704c32818b44ceb3.zip
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.stahl@allotropia.de> (cherry picked from commit d37486537e7d404b19acdfaec358cb0ad706940c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134633 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--svx/source/form/formcontrolling.cxx1
1 files changed, 1 insertions, 0 deletions
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 );