[Libreoffice-commits] core.git: 2 commits - xmlhelp/source xmlsecurity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Oct 20 17:51:22 UTC 2018
xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx | 1 -
xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx | 11 +++++------
2 files changed, 5 insertions(+), 7 deletions(-)
New commits:
commit 83c82bbb73dec5e3ba82e81b09824cd223e575a7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 16:18:35 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 20 19:51:14 2018 +0200
pvs-studio: A part of conditional expression is always true: bSigValid.
Change-Id: I4da53c79bb9e47548338d3e348677049e664bf8d
Reviewed-on: https://gerrit.libreoffice.org/62053
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 6a5a5936c833..61300fdf6156 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -571,7 +571,6 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
OUString aDescription;
OUString aType;
- bool bSigValid = false;
bool bCertValid = false;
if( xCert.is() )
{
@@ -622,7 +621,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
aType = "PDF";
}
- bSigValid = ( rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED );
+ bool bSigValid = rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED;
if ( bSigValid )
{
@@ -638,7 +637,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
{
aImage = m_pSigsInvalidImg->GetImage();
}
- else if (bSigValid && !bCertValid)
+ else if (!bCertValid)
{
aImage = m_pSigsNotvalidatedImg->GetImage();
}
@@ -647,20 +646,20 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
// If there is no storage, then it's pointless to check storage
// stream references.
else if (maSignatureManager.meSignatureMode == DocumentSignatureMode::Content
- && bSigValid && bCertValid && (maSignatureManager.mxStore.is() && !DocumentSignatureHelper::isOOo3_2_Signature(
+ && bCertValid && (maSignatureManager.mxStore.is() && !DocumentSignatureHelper::isOOo3_2_Signature(
maSignatureManager.maCurrentSignatureInformations[n])))
{
aImage = m_pSigsNotvalidatedImg->GetImage();
bAllNewSignatures = false;
}
else if (maSignatureManager.meSignatureMode == DocumentSignatureMode::Content
- && bSigValid && bCertValid && DocumentSignatureHelper::isOOo3_2_Signature(
+ && bCertValid && DocumentSignatureHelper::isOOo3_2_Signature(
maSignatureManager.maCurrentSignatureInformations[n]))
{
aImage = m_pSigsValidImg->GetImage();
}
else if (maSignatureManager.meSignatureMode == DocumentSignatureMode::Macros
- && bSigValid && bCertValid)
+ && bCertValid)
{
aImage = m_pSigsValidImg->GetImage();
}
commit 5145882f8f33ce2588722ae7439fc47d1cdcaaf6
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 19 17:01:05 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 20 19:51:00 2018 +0200
pvs-studio: The 'aIndexFolderResultVector' variable is used after it was moved
Change-Id: I565f22594a371188c4a6eff5f405946ec1e04d95
Reviewed-on: https://gerrit.libreoffice.org/62061
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index 92e20e6049d0..66ccaf747696 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -237,7 +237,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte
}
aIndexFolderResultVectorVector.push_back( std::move(aIndexFolderResultVector) );
- aIndexFolderResultVector.clear();
}
catch (const Exception &e)
{
More information about the Libreoffice-commits
mailing list