sc/source/core/data/bcaslot.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 46edb26ddfa6e37da9a3be16bf2f25cbe4aff417
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Feb 10 13:41:26 2022 +0100
Commit:     Aron Budea <aron.bu...@collabora.com>
CommitDate: Wed Mar 23 20:51:42 2022 +0100

    -Werror=type-limits
    
    > 
/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sc/source/core/data/bcaslot.cxx:647:25:
 error: comparison of unsigned expression >= 0 is always true 
[-Werror=type-limits]
    >              assert(slot >= 0 && slot < mnBcaSlots);
    >                     ~~~~~^~~~
    
    (<https://ci.libreoffice.org//job/lo_tb_master_linux_dbg/36619/>), where 
slot is of
    type SCSIZE, which is a typedef for size_t (sc/inc/address.hxx)
    
    Change-Id: I52cfa8b746791d4bd43be9a9d16cda992319c694
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129781
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 405a7a09558ad17642808cc3739ab202f86bea0c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131982
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Aron Budea <aron.bu...@collabora.com>

diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index dbf9c8a59fff..4080c4507528 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -643,7 +643,7 @@ inline SCSIZE ScBroadcastAreaSlotMachine::ComputeSlotOffset(
                 + static_cast<SCSIZE>(nRow - rSD.nStartRow) / rSD.nSliceRow
                 + rSD.nCumulatedCol
                 + static_cast<SCSIZE>(nCol - rSD.nStartCol) / rSD.nSliceCol * 
mnBcaSlotsCol;
-            assert(slot >= 0 && slot < mnBcaSlots);
+            assert(slot < mnBcaSlots);
             return slot;
         }
     }

Reply via email to