sd/source/core/drawdoc2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b72e4e938c81b71b4aeb47aa677d84c26709e1b2
Author:     Miklos Vajna <[email protected]>
AuthorDate: Mon Nov 24 09:14:21 2025 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Mon Nov 24 14:30:25 2025 +0100

    sd: fix -Werror=sign-compare
    
            sd/source/core/drawdoc2.cxx: In member function ‘bool 
SdDrawDocument::ValidateCanvasPage(const SdPage*) const’:
            sd/source/core/drawdoc2.cxx:1491:32: error: comparison of integer 
expressions of different signedness: ‘std::__cxx1998::unordered_set<SdrPage*, 
std::hash<SdrPage*>, std::equal_to<SdrPage*>, std::allocator<SdrPage*> 
>::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Werror=sign-compare]
             1491 |     if (aPreviewPageSet.size() != 
GetSdPageCount(PageKind::Standard) - 1)
                  |         
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Seen with GCC 12.3.0.
    
    Change-Id: I34a6e93faa68a503eeaab943ef08d7023ab81851
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194410
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index 12df76453862..8ce9859989ab 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -1488,7 +1488,7 @@ bool SdDrawDocument::ValidateCanvasPage(const SdPage* 
pPage) const
         else
             aPreviewPageSet.insert(pPreviewPage);
     }
-    if (aPreviewPageSet.size() != GetSdPageCount(PageKind::Standard) - 1)
+    if (aPreviewPageSet.size() != 
o3tl::make_unsigned(GetSdPageCount(PageKind::Standard) - 1))
         return false;
     return true;
 }

Reply via email to