diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-20 12:02:48 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-23 06:17:29 +0000 |
commit | 7b26389414b203a4f3225acf0c027b93bcb234ac (patch) | |
tree | 144aeb20c5e191840c4fb862106b0d0344d0260f /sw | |
parent | 85ea267b7a8fbd5859569db6ef7ac8dd1bd9bcd1 (diff) |
clang-tidy clang-analyzer-deadcode.DeadStores
Change-Id: I7113a13ac36db5beef3a17e9849c1f5506df2374
Reviewed-on: https://gerrit.libreoffice.org/25194
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/text/frmcrsr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par2.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par5.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/uno/unomod.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/utlui/prcntfld.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/utlui/uitool.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/select.cxx | 2 |
12 files changed, 6 insertions, 23 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 43a18ad7a154..c01455adf983 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1657,7 +1657,6 @@ bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh, if( !pSNd->GetSection().IsHidden() && !pSNd->IsContentHidden() ) { pSNd->MakeFrames( &aFrameIdx, &aDelRg.aEnd ); - pFrameNd = pSNd; break; } aDelRg.aStart = *pSNd->EndOfSectionNode(); diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index c75e90dcc837..816e08172d12 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -2025,7 +2025,6 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) if( bCallACorr ) { - bCallACorr = false; m_aDelPam.GetPoint()->nContent = nPos; SetRedlineText( STR_AUTOFMTREDL_USE_REPLACE ); if( m_aFlags.bAutoCorrect && diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 00599a1d7476..eda55e9de8af 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -1504,7 +1504,7 @@ void SwTextFrame::FillCursorPos( SwFillData& rFill ) const SwTwips nTextLeft = rFill.Left() + rLRSpace.GetTextLeft() + GetTextNode()->GetLeftMarginWithNum( true ); rFill.nLineWidth += rFill.bFirstLine ? nLeft : nTextLeft; - SwTwips nLeftTab = nLeft; + SwTwips nLeftTab; SwTwips nRightTab = nLeft; sal_uInt16 nSpaceCnt = 0; sal_uInt16 nTabCnt = 0; diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index b7f2129093c9..2259939b0e5f 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -4295,7 +4295,6 @@ void WW8RStyle::ImportOldFormatStyles() { //more data than style slots, skip remainder rSt.SeekRel(cbChpx-nByteCount); - nByteCount += cbChpx-nByteCount; break; } @@ -4341,7 +4340,6 @@ void WW8RStyle::ImportOldFormatStyles() if (stcp == aPAPXOffsets.size()) { rSt.SeekRel(cbPapx-nByteCount); - nByteCount += cbPapx-nByteCount; break; } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index a72b08365fa3..ab18387cfa26 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -158,7 +158,7 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*) nLen = MAX_FIELDLEN; long nOldPos = m_pStrm->Tell(); - nLen = m_pSBase->WW8ReadString( *m_pStrm, aVal, pB->GetStartPos(), nLen, + m_pSBase->WW8ReadString( *m_pStrm, aVal, pB->GetStartPos(), nLen, m_eStructCharSet ); m_pStrm->Seek( nOldPos ); @@ -1113,7 +1113,7 @@ long SwWW8ImplReader::Read_F_Tag( WW8FieldDesc* pF ) nL = MAX_FIELDLEN; // MaxLaenge, durch Quoten // max. 4* so gross OUString sFText; - nL = m_pSBase->WW8ReadString( *m_pStrm, sFText, + m_pSBase->WW8ReadString( *m_pStrm, sFText, m_pPlcxMan->GetCpOfs() + nStart, nL, m_eStructCharSet); OUString aTagText; @@ -1177,7 +1177,7 @@ OUString SwWW8ImplReader::GetFieldResult( WW8FieldDesc* pF ) // max. 4* as big OUString sRes; - nL = m_pSBase->WW8ReadString( *m_pStrm, sRes, m_pPlcxMan->GetCpOfs() + nStart, + m_pSBase->WW8ReadString( *m_pStrm, sRes, m_pPlcxMan->GetCpOfs() + nStart, nL, m_eStructCharSet ); m_pStrm->Seek( nOldPos ); diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index efe00fa0ba0f..6bf744e2669d 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -6584,7 +6584,6 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd ) pStd->istdNext = ( a16Bit & 0xfff0 ) >> 4; if( 8 > nRead ) break; - a16Bit = 0; rSt.ReadUInt16( pStd->bchUpe ); // from Ver8 this two fields should be added: diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 65603cfb4a97..626781f31fbd 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -678,7 +678,7 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream, pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, false ); // mba: no BaseURL for clipboard SfxMedium aMedium( xWorkStore, OUString() ); - bRet = pEmbObj->DoSaveObjectAs( aMedium, false ); + pEmbObj->DoSaveObjectAs( aMedium, false ); pEmbObj->DoSaveCompleted(); uno::Reference< embed::XTransactedObject > xTransact( xWorkStore, uno::UNO_QUERY ); @@ -693,8 +693,6 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream, pSrcStm.reset(); } - bRet = true; - xWorkStore->dispose(); xWorkStore.clear(); xStream->Commit(); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 343772631d37..434ab27ef89a 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2528,7 +2528,6 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_NumOff: // shell change - so record in advance rSh.DelNumRules(); - eKeyState = eNextKeyState; break; case KS_OutlineLvOff: // delete autofmt outlinelevel later break; diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx index cab2f7649949..d9622958af09 100644 --- a/sw/source/uibase/uno/unomod.cxx +++ b/sw/source/uibase/uno/unomod.cxx @@ -283,9 +283,6 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, IllegalArgumentException, WrappedTargetException) { bool bVal; - if ( rInfo.mnHandle != HANDLE_PRINTSET_ANNOTATION_MODE && - rInfo.mnHandle != HANDLE_PRINTSET_FAX_NAME ) - bVal = *static_cast<sal_Bool const *>(rValue.getValue()); switch( rInfo.mnHandle ) { diff --git a/sw/source/uibase/utlui/prcntfld.cxx b/sw/source/uibase/utlui/prcntfld.cxx index 1234f805753a..fc29014faca3 100644 --- a/sw/source/uibase/utlui/prcntfld.cxx +++ b/sw/source/uibase/utlui/prcntfld.cxx @@ -173,11 +173,6 @@ void PercentField::SetMax(sal_Int64 nNewMax, FieldUnit eInUnit) { if (m_pField->GetUnit() != FUNIT_CUSTOM) m_pField->SetMax(nNewMax, eInUnit); - else - { - if (eInUnit == FUNIT_NONE) - eInUnit = eOldUnit; - } } sal_Int64 PercentField::NormalizePercent(sal_Int64 nValue) diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index fe0d61b004c8..f566769fe678 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -359,7 +359,6 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) { rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>( rFooterSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue()); - nFirstShare = rPageDesc.IsFirstShared() ? 1 : 0; } } else diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index 1dd165c71cb3..4defb8b64f99 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -923,7 +923,7 @@ void SwWrtShell::SelectNextPrevHyperlink( bool bNext ) SttEndDoc(true); else SttEndDoc(false); - bRet = SwCursorShell::SelectNxtPrvHyperlink( bNext ); + SwCursorShell::SelectNxtPrvHyperlink( bNext ); } EndAction(); |