slideshow/source/engine/box2dtools.cxx |    9 ++++++++-
 xmloff/source/text/txtimppr.cxx        |    2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit ae36c06e563276b9254ad7c19bfb127b75f9f712
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu Jan 22 10:13:29 2026 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Jan 22 22:49:58 2026 +0100

    Silence spurious -Werror=array-bounds=
    
    seen at least with recent GCC 16 trunk,
    
    > In file included from ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:53,
    >                  from ~/gcc/inst/include/c++/16.0.1/memory:82,
    >                  from include/rtl/stringconcat.hxx:22,
    >                  from include/rtl/string.hxx:51,
    >                  from include/rtl/ustring.hxx:45,
    >                  from 
workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/Exception.hdl:9,
    >                  from 
workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hdl:6,
    >                  from 
workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hpp:6,
    >                  from include/com/sun/star/uno/Reference.hxx:32,
    >                  from slideshow/source/inc/shape.hxx:23,
    >                  from slideshow/source/inc/box2dtools.hxx:12,
    >                  from slideshow/source/engine/box2dtools.cxx:10:
    > In destructor ‘std::__shared_count<_Lp>::~__shared_count() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp 
= b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
    >     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
    >     inlined from ‘box2d::utils::box2DBody::~box2DBody()’ at 
slideshow/source/inc/box2dtools.hxx:333:7,
    >     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = 
box2d::utils::box2DBody]’ at 
~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:18,
    >     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = 
box2d::utils::box2DBody]’ at 
~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:164:22,
    >     inlined from ‘static constexpr void 
std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) 
[with _Up = box2d::utils::box2DBody]’ at 
~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:819:17,
    >     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, 
_Lp>::_M_dispose() [with _Tp = box2d::utils::box2DBody; _Alloc = 
std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:675:35,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:423:18,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
    >     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp 
= b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
    >     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
    >     inlined from ‘box2d::utils::Box2DBodySharedPtr 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)’ at 
slideshow/source/engine/box2dtools.cxx:731:1:
    > ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1128:13: error: 
array subscript 3 is outside array bounds of ‘std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic> [1]’ [-Werror=array-bounds=]
    >  1128 |         if (_M_pi != nullptr)
    >       |             ^~~~~
    > In file included from 
~/gcc/inst/include/c++/16.0.1/x86_64-pc-linux-gnu/bits/c++allocator.h:33,
    >                  from ~/gcc/inst/include/c++/16.0.1/bits/allocator.h:46,
    >                  from ~/gcc/inst/include/c++/16.0.1/string:46,
    >                  from 
~/gcc/inst/include/c++/16.0.1/bits/locale_classes.h:43,
    >                  from ~/gcc/inst/include/c++/16.0.1/bits/ios_base.h:43,
    >                  from ~/gcc/inst/include/c++/16.0.1/ios:46,
    >                  from ~/gcc/inst/include/c++/16.0.1/bits/ostream.h:43,
    >                  from ~/gcc/inst/include/c++/16.0.1/ostream:42,
    >                  from include/com/sun/star/uno/Reference.hxx:29:
    > In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, 
const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’,
    >     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> 
>::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’ at 
~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
    >     inlined from ‘static constexpr _Tp* 
std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, 
size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’ at 
~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
    >     inlined from ‘std::__allocated_ptr<_Alloc> 
std::__allocate_guarded(_Alloc&) [with _Alloc = 
allocator<_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, 
__gnu_cxx::_S_atomic> >]’ at 
~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
    >     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, 
_Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = 
std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy 
_Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
    >     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, 
_Deleter) [with _Ptr = b2Body*; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, 
_Deleter) [with _Yp = b2Body; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
    >     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with 
_Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; _Tp = b2Body]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
    >     inlined from ‘box2d::utils::Box2DBodySharedPtr 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)’ at 
slideshow/source/engine/box2dtools.cxx:669:6:
    > ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at 
offset 24 into object of size 24 allocated by ‘operator new’
    >   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * 
sizeof(_Tp)));
    >       |                                                                   
  ^
    > In destructor ‘box2d::utils::box2DBody::~box2DBody()’,
    >     inlined from ‘constexpr void std::destroy_at(_Tp*) [with _Tp = 
box2d::utils::box2DBody]’ at 
~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:18,
    >     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = 
box2d::utils::box2DBody]’ at 
~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:164:22,
    >     inlined from ‘static constexpr void 
std::allocator_traits<std::allocator<void> >::destroy(allocator_type&, _Up*) 
[with _Up = box2d::utils::box2DBody]’ at 
~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:819:17,
    >     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, 
_Lp>::_M_dispose() [with _Tp = box2d::utils::box2DBody; _Alloc = 
std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:675:35,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:423:18,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
    >     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp 
= b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
    >     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
    >     inlined from ‘box2d::utils::Box2DBodySharedPtr 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)’ at 
slideshow/source/engine/box2dtools.cxx:731:1:
    > slideshow/source/inc/box2dtools.hxx:333:7: error: array subscript 
‘box2d::utils::box2DBody[0]’ is partly outside array bounds of ‘unsigned char 
[24]’ [-Werror=array-bounds=]
    >   333 | class box2DBody
    >       |       ^~~~~~~~~
    > In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, 
const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’,
    >     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> 
>::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’ at 
~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
    >     inlined from ‘static constexpr _Tp* 
std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, 
size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’ at 
~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
    >     inlined from ‘std::__allocated_ptr<_Alloc> 
std::__allocate_guarded(_Alloc&) [with _Alloc = 
allocator<_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, 
__gnu_cxx::_S_atomic> >]’ at 
~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
    >     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, 
_Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = 
std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy 
_Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
    >     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, 
_Deleter) [with _Ptr = b2Body*; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, 
_Deleter) [with _Yp = b2Body; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
    >     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with 
_Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; _Tp = b2Body]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
    >     inlined from ‘box2d::utils::Box2DBodySharedPtr 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)’ at 
slideshow/source/engine/box2dtools.cxx:669:6:
    > ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at 
offset 16 into object of size 24 allocated by ‘operator new’
    >   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * 
sizeof(_Tp)));
    >       |                                                                   
  ^
    > In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, 
_Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = 
std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
    >     inlined from ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, 
_Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = 
std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_destroy() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:143:9,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
    >     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp 
= b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
    >     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
    >     inlined from ‘box2d::utils::Box2DBodySharedPtr 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)’ at 
slideshow/source/engine/box2dtools.cxx:731:1:
    > ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array 
subscript ‘std::_Sp_counted_ptr_inplace<box2d::utils::box2DBody, 
std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds 
of ‘unsigned char [24]’ [-Werror=array-bounds=]
    >   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
    >       |                                             ^
    > In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, 
const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’,
    >     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> 
>::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’ at 
~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
    >     inlined from ‘static constexpr _Tp* 
std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, 
size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’ at 
~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
    >     inlined from ‘std::__allocated_ptr<_Alloc> 
std::__allocate_guarded(_Alloc&) [with _Alloc = 
allocator<_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, 
__gnu_cxx::_S_atomic> >]’ at 
~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
    >     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, 
_Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = 
std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy 
_Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
    >     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, 
_Deleter) [with _Ptr = b2Body*; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, 
_Deleter) [with _Yp = b2Body; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
    >     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with 
_Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; _Tp = b2Body]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
    >     inlined from ‘box2d::utils::Box2DBodySharedPtr 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)’ at 
slideshow/source/engine/box2dtools.cxx:669:6:
    > ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object 
of size 24 allocated by ‘operator new’
    >   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * 
sizeof(_Tp)));
    >       |                                                                   
  ^
    > In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, 
_Lp>::~_Sp_counted_ptr_inplace() [with _Tp = box2d::utils::box2DBody; _Alloc = 
std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’,
    >     inlined from ‘void std::_Sp_counted_ptr_inplace<_Tp, _Alloc, 
_Lp>::_M_destroy() [with _Tp = box2d::utils::box2DBody; _Alloc = 
std::allocator<void>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:684:32,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:424:18,
    >     inlined from ‘void std::_Sp_counted_base<_Lp>::_M_release() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:392:5,
    >     inlined from ‘std::__shared_count<_Lp>::~__shared_count() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1129:21,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::~__shared_ptr() [with _Tp 
= b2Body; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1603:7,
    >     inlined from ‘std::shared_ptr<b2Body>::~shared_ptr()’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
    >     inlined from ‘box2d::utils::Box2DBodySharedPtr 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)’ at 
slideshow/source/engine/box2dtools.cxx:731:1:
    > ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array 
subscript ‘std::_Sp_counted_ptr_inplace<box2d::utils::box2DBody, 
std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds 
of ‘unsigned char [24]’ [-Werror=array-bounds=]
    >   670 |       ~_Sp_counted_ptr_inplace() noexcept { }
    >       |                                             ^
    > In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, 
const void*) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’,
    >     inlined from ‘constexpr _Tp* std::allocator< <template-parameter-1-1> 
>::allocate(std::size_t) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’ at 
~/gcc/inst/include/c++/16.0.1/bits/allocator.h:203:40,
    >     inlined from ‘static constexpr _Tp* 
std::allocator_traits<std::allocator<_CharT> >::allocate(allocator_type&, 
size_type) [with _Tp = std::_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, std::allocator<void>, 
__gnu_cxx::_S_atomic>]’ at 
~/gcc/inst/include/c++/16.0.1/bits/alloc_traits.h:614:28,
    >     inlined from ‘std::__allocated_ptr<_Alloc> 
std::__allocate_guarded(_Alloc&) [with _Alloc = 
allocator<_Sp_counted_deleter<b2Body*, 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>, allocator<void>, 
__gnu_cxx::_S_atomic> >]’ at 
~/gcc/inst/include/c++/16.0.1/bits/allocated_ptr.h:103:69,
    >     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, 
_Deleter, _Alloc) [with _Ptr = b2Body*; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; _Alloc = 
std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy 
_Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1007:13,
    >     inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, 
_Deleter) [with _Ptr = b2Body*; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:996:57,
    >     inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, 
_Deleter) [with _Yp = b2Body; _Deleter = 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; _Tp = b2Body; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1557:17,
    >     inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with 
_Yp = b2Body; _Deleter = box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)::<lambda(b2Body*)>; 
<template-parameter-2-3> = void; _Tp = b2Body]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:231:48,
    >     inlined from ‘box2d::utils::Box2DBodySharedPtr 
box2d::utils::box2DWorld::createStaticBody(const 
slideshow::internal::ShapeSharedPtr&)’ at 
slideshow/source/engine/box2dtools.cxx:669:6:
    > ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object 
of size 24 allocated by ‘operator new’
    >   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * 
sizeof(_Tp)));
    >       |                                                                   
  ^
    
    Change-Id: I437410fb3ca777405f8153c13c3e3cc47bc6e8b3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197839
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/slideshow/source/engine/box2dtools.cxx 
b/slideshow/source/engine/box2dtools.cxx
index c07921fc0162..aea4a37ad024 100644
--- a/slideshow/source/engine/box2dtools.cxx
+++ b/slideshow/source/engine/box2dtools.cxx
@@ -728,7 +728,14 @@ Box2DBodySharedPtr box2DWorld::createStaticBody(const 
slideshow::internal::Shape
     }
 
     return std::make_shared<box2DBody>(pBody, mfScaleFactor);
-}
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+}
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16
+#pragma GCC diagnostic pop
+#endif
 
 box2DBody::box2DBody(std::shared_ptr<b2Body> pBox2DBody, double fScaleFactor)
     : mpBox2DBody(std::move(pBox2DBody))
commit 3e9763c0aeecbc203b040e342b34d015ad270e77
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu Jan 22 09:37:46 2026 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Jan 22 22:49:46 2026 +0100

    -Werror=maybe-uninitialized
    
    > xmloff/source/text/txtimppr.cxx:615:9: error: ‘nVertOrient’ may be used 
uninitialized [-Werror=maybe-uninitialized]
    >   615 |         switch( nVertOrient )
    >       |         ^~~~~~
    
    So use the same approach for nVertOrient as was already used for 
nVertOrientRel
    in 7ab4c76e73e6ebabe1363f542d61c9bc5b91cbc2 "INTEGRATION: CWS warningfixes02
    (1.18.10); FILE MERGED", initializing it to 0 aka 
css.text.VertOrientation.NONE.
    
    Change-Id: Ibf9b259f87fb030e426664bc3bbd63fc1bfb0797
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197832
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index 7fde78724227..38e6f66960e4 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -608,7 +608,7 @@ void XMLTextImportPropertyMapper::finished(
 
     if( pVertOrient && pVertOrientRelAsChar )
     {
-        sal_Int16 nVertOrient;
+        sal_Int16 nVertOrient = 0;
         pVertOrient->maValue >>= nVertOrient;
         sal_Int16 nVertOrientRel = 0;
         pVertOrientRelAsChar->maValue >>= nVertOrientRel;

Reply via email to