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

New commits:
commit 405a7a09558ad17642808cc3739ab202f86bea0c
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Feb 10 13:41:26 2022 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Fri Feb 11 07:38:07 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

diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 509103d397f0..bff56a5cd910 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -644,7 +644,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