filter/source/msfilter/msdffimp.cxx | 14 ++++++++++++++ svx/source/annotation/TextAPI.cxx | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-)
New commits: commit c0370b81ee8c900486df48030c9bf362fb7fd897 Author: Stephan Bergmann <[email protected]> AuthorDate: Mon Oct 27 22:27:00 2025 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Tue Oct 28 07:53:15 2025 +0100 Copy from rSource, not from *this ...which had been the case ever since 5d431414afa79d392fe6a885940c559236c25aa2 "CWS-TOOLING: integrate CWS impressnotes01", but caused > svx/source/annotation/TextAPI.cxx:187:32: error: ‘<unknown>’ may be used uninitialized [-Werror=maybe-uninitialized] > 187 | , mpHolder(rSource.mpHolder) // shallow copy; uses internal refcounting > | ^ > In file included from include/editeng/unotext.hxx:55, > from include/svx/annotation/TextAPI.hxx:22, > from svx/source/annotation/TextAPI.cxx:24: > include/editeng/unoedsrc.hxx:59:5: note: by argument 2 of type ‘const SvxEditSource&’ to ‘constexpr SvxEditSource::SvxEditSource(const SvxEditSource&)’ declared here > 59 | SvxEditSource(SvxEditSource const &) = default; > | ^~~~~~~~~~~~~ at least with --disable-optimized against recent GCC 16 trunk Change-Id: I2815df15042444aa2826f25262253cb78ec0da68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193059 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/svx/source/annotation/TextAPI.cxx b/svx/source/annotation/TextAPI.cxx index d3891f7f5958..0eedf638de6b 100644 --- a/svx/source/annotation/TextAPI.cxx +++ b/svx/source/annotation/TextAPI.cxx @@ -183,7 +183,7 @@ TextApiObject* TextApiObject::getImplementation(const css::uno::Reference<css::t } TextAPIEditSource::TextAPIEditSource(const TextAPIEditSource& rSource) - : SvxEditSource(*this) + : SvxEditSource(rSource) , mpHolder(rSource.mpHolder) // shallow copy; uses internal refcounting { } commit b792c423259c4bc475ed075d0e1abc8942e8eb0d Author: Stephan Bergmann <[email protected]> AuthorDate: Mon Oct 27 22:23:44 2025 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Tue Oct 28 07:53:01 2025 +0100 Silence -Werror=maybe-uninitialized ...as seen at least with --disable-optimized against recent GCC 16 trunk, > filter/source/msfilter/msdffimp.cxx:5810:24: error: ‘<unknown>’ may be used uninitialized [-Werror=maybe-uninitialized] > 5810 | mbSkipImages(false) > | ^ > filter/source/msfilter/msdffimp.cxx:239:1: note: by argument 2 of type ‘const SvxMSDffManager&’ to ‘DffPropertyReader::DffPropertyReader(const SvxMSDffManager&)’ declared here > 239 | DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) > | ^~~~~~~~~~~~~~~~~ > filter/source/msfilter/msdffimp.cxx: In constructor ‘SvxMSDffManager::SvxMSDffManager(SvStream&, rtl::OUString, sal_uInt32, SvStream*, SdrModel*, tools::Long, Color, SvStream*, bool)’: > filter/source/msfilter/msdffimp.cxx:5769:31: error: ‘<unknown>’ may be used uninitialized [-Werror=maybe-uninitialized] > 5769 | mbSkipImages (bSkipImages) > | ^ > filter/source/msfilter/msdffimp.cxx:239:1: note: by argument 2 of type ‘const SvxMSDffManager&’ to ‘DffPropertyReader::DffPropertyReader(const SvxMSDffManager&)’ declared here > 239 | DffPropertyReader::DffPropertyReader( const SvxMSDffManager& rMan ) > | ^~~~~~~~~~~~~~~~~ Change-Id: Ib1cb233e0208c8316db399c369a4879bca5b31eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193058 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 1fe08f8ac50e..f7aa83bbd619 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -5743,6 +5743,10 @@ void SvxMSDffManager::RemoveFromShapeOrder( SdrObject const * pObject ) const // exported class: Public Methods +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, OUString aBaseURL, sal_uInt32 nOffsDgg_, @@ -5792,7 +5796,14 @@ SvxMSDffManager::SvxMSDffManager(SvStream& rStCtrl_, if( &rStCtrl != pStData ) pStData->Seek( nOldPosData ); } +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16 +#pragma GCC diagnostic pop +#endif +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, OUString aBaseURL ) :DffPropertyReader( *this ), m_xShapeInfosByTxBxComp( new SvxMSDffShapeInfos_ByTxBxComp ), @@ -5811,6 +5822,9 @@ SvxMSDffManager::SvxMSDffManager( SvStream& rStCtrl_, OUString aBaseURL ) { SetModel( nullptr, 0 ); } +#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16 +#pragma GCC diagnostic pop +#endif SvxMSDffManager::~SvxMSDffManager() {
