diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-13 17:32:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-14 08:25:30 +0200 |
commit | 0e50b4bea313509b57fc15c4e4ced8be6f22bd49 (patch) | |
tree | 1f6291615001f4edc21ece2a6fe0418b24553daf /oox | |
parent | 61688aa1abd9db9adbb8dc5d5aacc6269b21fd27 (diff) |
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@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ole/vbaexport.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
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) |