[Libreoffice-commits] core.git: accessibility/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sat Jan 25 16:29:04 UTC 2020


 accessibility/source/standard/vclxaccessibleheaderbar.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bca204a32525f0c1aa811bab667a2136269453bd
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Sat Jan 25 13:43:37 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Jan 25 17:28:33 2020 +0100

    Avoid explicit cast to smaller sal_uInt16 from larger sal_Int32
    
    ...in what might be an attempt to avoid warnings about signed vs. unsigned
    comparisons.  (The mismatch had been there ever since
    b755fb8c0f6b1282f62c12f378c0a5ecac64d490 "Integrate branch of IAccessible2".)
    
    Change-Id: I492a5d7bc41311de48b7ea1c7f646c2f5f982e93
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87398
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/accessibility/source/standard/vclxaccessibleheaderbar.cxx b/accessibility/source/standard/vclxaccessibleheaderbar.cxx
index 9eb46e5fea05..08c085b50fe6 100644
--- a/accessibility/source/standard/vclxaccessibleheaderbar.cxx
+++ b/accessibility/source/standard/vclxaccessibleheaderbar.cxx
@@ -20,6 +20,7 @@
 #include <standard/vclxaccessibleheaderbar.hxx>
 #include <standard/vclxaccessibleheaderbaritem.hxx>
 
+#include <o3tl/safeint.hxx>
 #include <vcl/headbar.hxx>
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <com/sun/star/accessibility/AccessibleRole.hpp>
@@ -82,7 +83,7 @@ css::uno::Reference< css::accessibility::XAccessible > SAL_CALL
 
     Reference< XAccessible > xChild;
     // search for the child
-    if ( static_cast<sal_uInt16>(i) >= m_aAccessibleChildren.size() )
+    if ( o3tl::make_unsigned(i) >= m_aAccessibleChildren.size() )
         xChild = CreateChild (i);
     else
     {


More information about the Libreoffice-commits mailing list