[Libreoffice-commits] .: 2 commits - sw/source

Michael Stahl mst at kemper.freedesktop.org
Fri Jul 27 09:05:42 PDT 2012


 sw/source/core/doc/docredln.cxx        |    2 +-
 sw/source/core/unocore/unoredlines.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1c1f4f7dd9cdb25eb18b9396eaa1fc3e4cadba81
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 27 18:01:01 2012 +0200

    warning C4804: unsafe use of type 'bool'
    
    ... oh, MSVC actually found a bug there
    
    Change-Id: I4672e5cabf16a39da6ef5d6c3b7e938284570e6e

diff --git a/sw/source/core/unocore/unoredlines.cxx b/sw/source/core/unocore/unoredlines.cxx
index 82dd78e..8dda244 100644
--- a/sw/source/core/unocore/unoredlines.cxx
+++ b/sw/source/core/unocore/unoredlines.cxx
@@ -71,7 +71,7 @@ uno::Any SwXRedlines::getByIndex(sal_Int32 nIndex)
         throw uno::RuntimeException();
     const SwRedlineTbl& rRedTbl = GetDoc()->GetRedlineTbl();
     uno::Any aRet;
-    if(!rRedTbl.empty() > nIndex && nIndex >= 0)
+    if ((rRedTbl.size() > static_cast<size_t>(nIndex)) && (nIndex >= 0))
     {
         uno::Reference <beans::XPropertySet> xRet = SwXRedlines::GetObject( *rRedTbl[nIndex], *GetDoc() );
         aRet <<= xRet;
commit 46293c0a74f13e6cc5290fa5f062550c5db64b32
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jul 27 17:56:38 2012 +0200

    warning C4018: '>': signed/unsigned mismatch
    
    Change-Id: If554d308f78bfe93901e9faf6b10158c4fe1edea

diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index cd45f8a..ee4babf 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -2811,7 +2811,7 @@ sal_uInt16 SwRedlineTbl::FindNextSeqNo( sal_uInt16 nSeqNo, sal_uInt16 nSttPos,
     {
         nEnd = size();
         if( nLookahead && USHRT_MAX != nLookahead &&
-            nSttPos + nLookahead < size() )
+            static_cast<size_t>(nSttPos + nLookahead) < size() )
             nEnd = nSttPos + nLookahead;
 
         for( ; nSttPos < nEnd; ++nSttPos )


More information about the Libreoffice-commits mailing list