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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Jan 17 14:40:01 UTC 2020


 sfx2/source/bastyp/mieclip.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ac8ec39c0e0cc2244d2e155d9e256b4e2ded5415
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jan 17 13:55:18 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jan 17 15:36:59 2020 +0100

    Avoid unnecessary explicit cast
    
    ...which would only hide unexpected conversion failure, should it ever be
    possible to happen, from tools like -fsanitize=integer
    
    Change-Id: Ic2beab11078a40e16b92ce9ac868d296de028200
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86977
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index dd3871db719a..c99c61f045d6 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -79,7 +79,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
 
     if (nFragStart > 0 && nFragEnd > 0 && nFragEnd > nFragStart)
     {
-        size_t nSize = static_cast<size_t>(nFragEnd - nFragStart + 1);
+        size_t nSize = nFragEnd - nFragStart + 1;
         if (nSize < 0x10000L)
         {
             rStream.Seek(nFragStart);


More information about the Libreoffice-commits mailing list