diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-05-22 16:53:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-05-22 16:53:24 +0200 |
commit | 11e968c0dbb6a4eb139a22bfb5241352c85a86dd (patch) | |
tree | ef73a69d46d04c7af7130708fc8652124c32ec3a /sc | |
parent | 3a45af979605e2a1103304b0b52d328d39851fba (diff) |
Conditional jump or move depends on uninitialised value
Regression introduced with f7a011c45b0b88cb3c3ea9206cb851375266523d
"loplugin:unusedfields in sc" e.g. during `VALGRIND=memcheck make
CppunitTest_sc_subsequent_export_test
CPPUNIT_TEST_NAME=ScExportTest::testTrackChangesSimpleXLSX`:
> ==16928== Conditional jump or move depends on uninitialised value(s)
> ==16928== at 0x3C72975F: lcl_GenerateGUID(unsigned char*, bool&) (/sc/source/filter/xcl97/XclExpChangeTrack.cxx:87)
> ==16928== by 0x3C731303: XclExpChangeTrack::XclExpChangeTrack(XclExpRoot const&) (/sc/source/filter/xcl97/XclExpChangeTrack.cxx:1470)
> ==16928== by 0x3C18B6B1: ExcDocument::ReadDoc() (/sc/source/filter/excel/excdoc.cxx:788)
> ==16928== by 0x3C1FC902: ExportBiff5::Write() (/sc/source/filter/excel/expop2.cxx:112)
> ==16928== by 0x3C1A1506: lcl_ExportExcelBiff(SfxMedium&, ScDocument*, SvStream*, bool, unsigned short) (/sc/source/filter/excel/excel.cxx:181)
> ==16928== by 0x3C1A1044: ScFormatFilterPluginImpl::ScExportExcel5(SfxMedium&, ScDocument*, ExportFormatExcel, unsigned short) (/sc/source/filter/excel/excel.cxx:219)
> ==16928== by 0x2D947526: ScDocShell::ConvertTo(SfxMedium&) (/sc/source/ui/docshell/docsh.cxx:2325)
> ==16928== by 0x2FA06539: SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) (/sfx2/source/doc/objstor.cxx:1510)
> ==16928== by 0x2FA0A91D: SfxObjectShell::DoSaveAs(SfxMedium&) (/sfx2/source/doc/objstor.cxx:1897)
> ==16928== by 0x2EFD30D7: ScBootstrapFixture::saveAndReload(ScDocShell*, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags) (/sc/qa/unit/helper/qahelper.cxx:664)
> ==16928== by 0x2EFD381D: ScBootstrapFixture::saveAndReload(ScDocShell*, int) (/sc/qa/unit/helper/qahelper.cxx:686)
> ==16928== by 0x29A6ADEA: ScExportTest::testTrackChangesSimpleXLSX() (/sc/qa/unit/subsequent_export-test.cxx:2615)
Change-Id: I08f6a8e4a3827440f8b908791555e4b2226be12d
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xcl97/XclExpChangeTrack.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 3231609d921b..cde364769a7e 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -1457,6 +1457,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) : sal_uInt32 nIndex = 1; sal_Int32 nLogNumber = 1; sal_uInt8 aGUID[ 16 ]; // GUID for action info records + bool bValidGUID = false; while( !aActionStack.empty() ) { XclExpChTrAction* pAction = aActionStack.top(); @@ -1466,7 +1467,6 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) : (pAction->GetUsername() != sLastUsername) || (pAction->GetDateTime() != aLastDateTime) ) { - bool bValidGUID; lcl_GenerateGUID( aGUID, bValidGUID ); sLastUsername = pAction->GetUsername(); aLastDateTime = pAction->GetDateTime(); @@ -1495,6 +1495,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) : sal_Int32 nLogNumber = 1; XclExpXmlChTrHeader* pCurHeader = nullptr; sal_uInt8 aGUID[ 16 ]; // GUID for action info records + bool bValidGUID = false; while (!aActionStack.empty()) { @@ -1505,7 +1506,6 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) : (pAction->GetUsername() != sLastUsername) || (pAction->GetDateTime() != aLastDateTime) ) { - bool bValidGUID; lcl_GenerateGUID( aGUID, bValidGUID ); sLastUsername = pAction->GetUsername(); aLastDateTime = pAction->GetDateTime(); |