summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-11 15:56:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-12 10:31:25 +0100
commitf147b160aef1735d34c488353a7d4b875788a7e1 (patch)
treeab3bd613cf016cde906b3fdcbaab4246ca699e1e /sdext
parent718f540fb63af27c1336f89213444e9af753b8a9 (diff)
clang-analyzer-deadcode.DeadStores
Change-Id: Ifa384933569b27d0d08eb479bb95b799163ae386 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88450 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/filterdet.cxx15
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx4
2 files changed, 8 insertions, 11 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index 004d2d813abf..b3fe676315fa 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -88,9 +88,9 @@ FileEmitContext::FileEmitContext( const OUString& rOr
m_xSeek.set(m_xOut, uno::UNO_QUERY_THROW );
oslFileError aErr = osl_File_E_None;
- if( (aErr=osl_openFile( rOrigFile.pData,
- &m_aReadHandle,
- osl_File_OpenFlag_Read )) == osl_File_E_None )
+ if( osl_openFile( rOrigFile.pData,
+ &m_aReadHandle,
+ osl_File_OpenFlag_Read ) == osl_File_E_None )
{
if( (aErr=osl_setFilePos( m_aReadHandle,
osl_Pos_End,
@@ -437,10 +437,9 @@ bool checkDocChecksum( const OUString& rInPDFFileURL,
::std::vector<unsigned char> nChecksum;
::comphelper::Hash aDigest(::comphelper::HashType::MD5);
oslFileHandle aRead = nullptr;
- oslFileError aErr = osl_File_E_None;
- if( (aErr = osl_openFile(rInPDFFileURL.pData,
- &aRead,
- osl_File_OpenFlag_Read )) == osl_File_E_None )
+ if( osl_openFile(rInPDFFileURL.pData,
+ &aRead,
+ osl_File_OpenFlag_Read ) == osl_File_E_None )
{
sal_uInt8 aBuf[4096];
sal_uInt32 nCur = 0;
@@ -448,7 +447,7 @@ bool checkDocChecksum( const OUString& rInPDFFileURL,
while( nCur < nBytes )
{
sal_uInt32 nPass = std::min<sal_uInt32>(nBytes - nCur, sizeof( aBuf ));
- if( (aErr = osl_readFile( aRead, aBuf, nPass, &nBytesRead)) != osl_File_E_None
+ if( osl_readFile( aRead, aBuf, nPass, &nBytesRead) != osl_File_E_None
|| nBytesRead == 0 )
{
break;
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 88cb3e1789ab..f8e24addeacb 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -538,13 +538,11 @@ void PDFDict::insertValue( const OString& rName, std::unique_ptr<PDFEntry> pValu
else
{
unsigned int nSub = m_aSubElements.size();
- bool bFound = false;
- for( unsigned int i = 0; i < nSub && !bFound; i++ )
+ for( unsigned int i = 0; i < nSub; i++ )
if( m_aSubElements[i].get() == it->second )
{
m_aSubElements[i] = std::move(pValue);
pValueTmp = m_aSubElements[i].get();
- bFound = true;
break;
}
}