basic/source/classes/sbxmod.cxx        |    7 +++++++
 forms/source/component/RadioButton.cxx |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 5883c26f7c377d106bfad65627605fb761ba9fb2
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu Jan 22 09:55:59 2026 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Mar 9 09:53:34 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]>
    (cherry picked from commit 239941429188170b57c70a3d39f590b4514e5fa7)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200983
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[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 7f431d078795bc20b6eafc915d29e51d0e0744ff
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu Jan 22 09:42:29 2026 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Mon Mar 9 09:53:22 2026 +0100

    Silence spurious -Werror=array-bounds=
    
    seen at least with recent GCC 16 trunk,
    
    > In member function ‘virtual void SbModule::SetParent(SbxObject*)’,
    >     inlined from ‘virtual SbxVariable* SbModule::Find(const 
rtl::OUString&, SbxClassType)’ at basic/source/classes/sbxmod.cxx:653:36:
    > basic/source/classes/sbxmod.cxx:671:13: error: array subscript 
‘SbModule[0]’ is partly outside array bounds of ‘unsigned char [152]’ 
[-Werror=array-bounds=]
    >   671 |     pParent = p;
    >       |     ~~~~~~~~^~~
    > basic/source/classes/sbxmod.cxx: In member function ‘virtual SbxVariable* 
SbModule::Find(const rtl::OUString&, SbxClassType)’:
    > basic/source/classes/sbxmod.cxx:651:55: note: object of size 152 
allocated by ‘operator new’
    >   651 |                     pRes = new SbxVariable( SbxOBJECT );
    >       |                                                       ^
    
    Change-Id: I0823b28063b6e224f9cc28aee55fd21e2f21aa1a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197833
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit 56a43e096682b38780925e4ba8eb3e1bb056214a)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200981
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>

diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 722b9210db29..320cd8fbfd3c 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -651,7 +651,14 @@ SbxVariable* SbModule::Find( const OUString& rName, 
SbxClassType t )
 
                     pRes = new SbxVariable( SbxOBJECT );
                     pRes->SetName( aEnumName );
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
                     pRes->SetParent( this );
+#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 16
+#pragma GCC diagnostic pop
+#endif
                     pRes->SetFlag( SbxFlagBits::Read );
                     if( bPrivate )
                     {

Reply via email to