configmgr/source/access.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 717d276364c638d35eddc06d879133c9737fb589 Author: Stephan Bergmann <stephan.bergm...@collabora.com> AuthorDate: Thu Jul 24 08:23:09 2025 +0200 Commit: Michael Stahl <michael.st...@collabora.com> CommitDate: Wed Jul 30 18:47:28 2025 +0200 Silence bogus GCC -Wstringop-overflow ...seen at least with gcc-15.1.1-2.fc42.x86_64, when doing optimizing LO builds, > In file included from include/rtl/ustring.h:29, > from include/typelib/typedescription.h:29, > from include/com/sun/star/uno/Type.h:26, > from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/beans/Property.hdl:6, > from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/beans/Property.hpp:6, > from configmgr/source/access.cxx:28: > In member function ‘void configmgr::Access::releaseNondeleting()’, > inlined from ‘rtl::Reference<configmgr::ChildAccess> configmgr::Access::getUnmodifiedChild(const rtl::OUString&)’ at configmgr/source/access.cxx:2064:38: > include/osl/interlck.h:91:57: error: ‘unsigned int __sync_sub_and_fetch_4(volatile void*, unsigned int)’ writing 4 bytes into a region of size 0 overflows the destination [-Werror=stringop-overflow=] > 91 | # define osl_atomic_decrement(p) __sync_sub_and_fetch((p), 1) > | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~ > configmgr/source/access.cxx:134:5: note: in expansion of macro ‘osl_atomic_decrement’ > 134 | osl_atomic_decrement(&m_refCount); > | ^~~~~~~~~~~~~~~~~~~~ > In member function ‘rtl::Reference<configmgr::ChildAccess> configmgr::Access::getUnmodifiedChild(const rtl::OUString&)’: > cc1plus: note: destination object is likely at address zero Change-Id: I0885af282844fecaf4c117df7d24a943b62aa42c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188259 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@collabora.com> (cherry picked from commit 33bb647987f955412c0f1e4aae2e10cc4e91391d) diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 1e2d73dafe9c..c4d8819bd351 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -129,7 +129,14 @@ oslInterlockedCount Access::acquireCounting() { } void Access::releaseNondeleting() { +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 15 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif osl_atomic_decrement(&m_refCount); +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 15 +#pragma GCC diagnostic pop +#endif } bool Access::isValue() {