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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Aug 14 06:25:52 UTC 2018


 oox/source/ole/vbaexport.cxx |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 0e50b4bea313509b57fc15c4e4ced8be6f22bd49
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Aug 13 17:32:06 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Aug 14 08:25:30 2018 +0200

    Revert "Work around what looks like MSVC 2013 miscompilation"
    
    This reverts commit e58f9cad29404670085803a8010729a735759088 (plus follow-up
    5378963b262ade09f5a55ecb185164b2eac8c782 "Turns out this was a non-debug build"
    that merely tweaked the comment).  Lets hope that the alleged MSVC 2013
    miscompile is no longer an issue with our current MSVC 2017 baseline.  (And
    Clang's new -fsanitize=implicit-conversion complained about
    
      return nProjKey;
    
    truncating from sal_uInt32 2271 to sal_uInt8 223 during
    CppunitTest_oox_vba_encryption.)
    
    Change-Id: I0dd55e658899833899a8da1ce2111edb1524e7d5
    Reviewed-on: https://gerrit.libreoffice.org/58944
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index e8b41474026e..5d0d07be49a4 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -403,12 +403,7 @@ void VBAEncryption::writeVersionEnc()
 
 sal_uInt8 VBAEncryption::calculateProjKey(const OUString& rProjectKey)
 {
-    sal_uInt32 nProjKey = 0;
-        // use sal_uInt32 instead of sal_uInt8 to avoid miscompilation at least
-        // under "Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101
-        // for x64" with --enable-64-bit and non-debug, causing
-        // CppunitTest_oox_vba_encryption's TestVbaEncryption::testProjKey1 to
-        // fail with actual 53 vs. expected 223
+    sal_uInt8 nProjKey = 0;
     sal_Int32 n = rProjectKey.getLength();
     const sal_Unicode* pString = rProjectKey.getStr();
     for (sal_Int32 i = 0; i < n; ++i)


More information about the Libreoffice-commits mailing list