dbaccess/source/core/api/querycontainer.cxx |    7 +++++++
 forms/source/component/RadioButton.cxx      |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 239941429188170b57c70a3d39f590b4514e5fa7
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu Jan 22 09:55:59 2026 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Jan 22 22:49:03 2026 +0100

    -Werror=maybe-uninitialized
    
    Change-Id: I0933c67f66513eb6a16b4d3ecb35eec761f452bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197835
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/forms/source/component/RadioButton.cxx 
b/forms/source/component/RadioButton.cxx
index 3a6ffb139642..597e52370433 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -27,6 +27,7 @@
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/container/XIndexAccess.hpp>
 #include <com/sun/star/form/FormComponentType.hpp>
+#include <o3tl/any.hxx>
 
 namespace frm
 {
@@ -182,8 +183,7 @@ void 
ORadioButtonModel::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, cons
     if (nHandle != PROPERTY_ID_DEFAULT_STATE)
         return;
 
-    sal_Int16 nValue;
-    rValue >>= nValue;
+    sal_Int16 nValue = *o3tl::doAccess<sal_Int16>(rValue);
     if (1 == nValue)
     {   // Reset the 'default checked' for all Radios of the same group.
         // Because (as the Highlander already knew): "There can be only one"
commit 0360f4d2d2045e454390eae692e6dcf69b3af6b6
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu Jan 22 09:47:39 2026 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Jan 22 22:48:48 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/char_traits.h:59,
    >                  from ~/gcc/inst/include/c++/16.0.1/ios:44,
    >                  from ~/gcc/inst/include/c++/16.0.1/bits/ostream.h:43,
    >                  from ~/gcc/inst/include/c++/16.0.1/ostream:42,
    >                  from include/rtl/ustring.hxx:34,
    >                  from include/com/sun/star/uno/Any.h:30,
    >                  from include/cppuhelper/implbase_ex.hxx:26,
    >                  from include/cppuhelper/implbase5.hxx:26,
    >                  from dbaccess/source/core/inc/querycontainer.hxx:22,
    >                  from dbaccess/source/core/api/querycontainer.cxx:20:
    > In function ‘constexpr void std::destroy_at(_Tp*) [with _Tp = 
dbaccess::ODefinitionContainer_Impl]’,
    >     inlined from ‘constexpr void std::_Destroy(_Tp*) [with _Tp = 
dbaccess::ODefinitionContainer_Impl]’ 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 = dbaccess::ODefinitionContainer_Impl]’ 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 = dbaccess::ODefinitionContainer_Impl; _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 
= dbaccess::IContainerApprove; __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<dbaccess::IContainerApprove>::~shared_ptr()’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
    >     inlined from ‘void dbaccess::OQueryContainer::init()’ at 
dbaccess/source/core/api/querycontainer.cxx:87:61:
    > ~/gcc/inst/include/c++/16.0.1/bits/stl_construct.h:88:25: error: array 
subscript ‘dbaccess::ODefinitionContainer_Impl[0]’ is partly outside array 
bounds of ‘unsigned char [40]’ [-Werror=array-bounds=]
    >    88 |         __location->~_Tp();
    >       |         ~~~~~~~~~~~~~~~~^~
    > 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:
    > In member function ‘_Tp* std::__new_allocator<_Tp>::allocate(size_type, 
const void*) [with _Tp = 
std::_Sp_counted_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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(_Tp*&, 
std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = 
dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
    >     inlined from ‘std::__shared_ptr<_Tp, 
_Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = 
std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
    >     inlined from 
‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) 
[with _Alloc = std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ 
at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
    >     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > 
std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
    >     inlined from ‘void dbaccess::OQueryContainer::init()’ at 
dbaccess/source/core/api/querycontainer.cxx:87:61:
    > ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: at 
offset 16 into object of size 40 allocated by ‘operator new’
    >   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * 
sizeof(_Tp)));
    >       |                                                                   
  ^
    > 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:
    > In destructor ‘std::_Sp_counted_ptr_inplace<_Tp, _Alloc, 
_Lp>::~_Sp_counted_ptr_inplace() [with _Tp = 
dbaccess::ODefinitionContainer_Impl; _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 = 
dbaccess::ODefinitionContainer_Impl; _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 
= dbaccess::IContainerApprove; __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<dbaccess::IContainerApprove>::~shared_ptr()’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
    >     inlined from ‘void dbaccess::OQueryContainer::init()’ at 
dbaccess/source/core/api/querycontainer.cxx:87:61:
    > ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array 
subscript ‘std::_Sp_counted_ptr_inplace<dbaccess::ODefinitionContainer_Impl, 
std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds 
of ‘unsigned char [40]’ [-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_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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(_Tp*&, 
std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = 
dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
    >     inlined from ‘std::__shared_ptr<_Tp, 
_Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = 
std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
    >     inlined from 
‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) 
[with _Alloc = std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ 
at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
    >     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > 
std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
    >     inlined from ‘void dbaccess::OQueryContainer::init()’ at 
dbaccess/source/core/api/querycontainer.cxx:87:61:
    > ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object 
of size 40 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 = 
dbaccess::ODefinitionContainer_Impl; _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 = dbaccess::ODefinitionContainer_Impl; _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 
= dbaccess::IContainerApprove; __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<dbaccess::IContainerApprove>::~shared_ptr()’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:175:11,
    >     inlined from ‘void dbaccess::OQueryContainer::init()’ at 
dbaccess/source/core/api/querycontainer.cxx:87:61:
    > ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:670:45: error: array 
subscript ‘std::_Sp_counted_ptr_inplace<dbaccess::ODefinitionContainer_Impl, 
std::allocator<void>, __gnu_cxx::_S_atomic>[0]’ is partly outside array bounds 
of ‘unsigned char [40]’ [-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_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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_ptr_inplace<dbaccess::ObjectNameApproval, 
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(_Tp*&, 
std::_Sp_alloc_shared_tag<_Alloc>, _Args&& ...) [with _Tp = 
dbaccess::ObjectNameApproval; _Alloc = std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; __gnu_cxx::_Lock_policy _Lp = 
__gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1027:9,
    >     inlined from ‘std::__shared_ptr<_Tp, 
_Lp>::__shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) [with _Alloc = 
std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval; 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr_base.h:1805:14,
    >     inlined from 
‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_alloc_shared_tag<_Tp>, _Args&& ...) 
[with _Alloc = std::allocator<void>; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}; _Tp = dbaccess::ObjectNameApproval]’ 
at ~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:463:59,
    >     inlined from ‘std::shared_ptr<std::_NonArray<_Tp> > 
std::make_shared(_Args&& ...) [with _Tp = dbaccess::ObjectNameApproval; _Args = 
{com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection>&, 
dbaccess::ObjectNameApproval::ObjectType}]’ at 
~/gcc/inst/include/c++/16.0.1/bits/shared_ptr.h:1066:39,
    >     inlined from ‘void dbaccess::OQueryContainer::init()’ at 
dbaccess/source/core/api/querycontainer.cxx:87:61:
    > ~/gcc/inst/include/c++/16.0.1/bits/new_allocator.h:151:73: note: object 
of size 40 allocated by ‘operator new’
    >   151 |     return static_cast<_Tp*>(_GLIBCXX_OPERATOR_NEW(__n * 
sizeof(_Tp)));
    >       |                                                                   
  ^
    
    Change-Id: I089a58793649d892e88b7e3632c8b61f89b0a60c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197834
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/dbaccess/source/core/api/querycontainer.cxx 
b/dbaccess/source/core/api/querycontainer.cxx
index 2b615a878468..c95216387df6 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -84,7 +84,14 @@ void OQueryContainer::init()
         m_aDocuments.push_back(m_aDocumentMap.emplace(definitionName, 
Documents::mapped_type()).first);
     }
 
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
     setElementApproval( std::make_shared<ObjectNameApproval>( m_xConnection, 
ObjectNameApproval::TypeQuery ) );
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16
+#pragma GCC diagnostic pop
+#endif
 }
 
 rtl::Reference<OQueryContainer> OQueryContainer::create(

Reply via email to