diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 11:17:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-26 16:29:15 +0100 |
commit | daa6898578ec72faa406bfe08977f7d748610716 (patch) | |
tree | e75b8a538e8fe94882e84e87131d53840ecf7cc6 | |
parent | 4079089d0a3cf6b55c937447407f68b7339bca68 (diff) |
clang: Dead initialization
Change-Id: Ieae5303e55f21044ef8e91e63c4896696cfad51c
-rw-r--r-- | basic/source/runtime/methods1.cxx | 3 | ||||
-rw-r--r-- | extensions/source/update/check/updatehdl.cxx | 11 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 3 | ||||
-rw-r--r-- | svtools/source/contnr/simptabl.cxx | 7 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 3 |
5 files changed, 10 insertions, 17 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index d45e534439c2..a4e16229a0db 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -2337,7 +2337,6 @@ double implGetDateOfFirstDayInFirstWeek double dBaseDate; implDateSerial( nYear, 1, 1, dBaseDate ); - double dRetDate = dBaseDate; sal_Int16 nWeekDay0101 = implGetWeekDay( dBaseDate ); sal_Int16 nDayDiff = nWeekDay0101 - nFirstDay; @@ -2350,7 +2349,7 @@ double implGetDateOfFirstDayInFirstWeek if( nThisWeeksDaysInYearCount < nFirstWeekMinDays ) nDayDiff -= 7; } - dRetDate = dBaseDate - nDayDiff; + double dRetDate = dBaseDate - nDayDiff; return dRetDate; } diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 084ecb2e29f8..28dd1d281a8a 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -117,20 +117,15 @@ void UpdateHandler::enableControls( short nCtrlState ) if ( nCtrlState == mnLastCtrlState ) return; - bool bEnableControl; - - short nCurStateVal = nCtrlState; - short nOldStateVal = mnLastCtrlState; - // the help button should always be the last button in the // enum list und must never be disabled for ( int i=0; i<HELP_BUTTON; i++ ) { - nCurStateVal = (short)(nCtrlState >> i); - nOldStateVal = (short)(mnLastCtrlState >> i); + short nCurStateVal = (short)(nCtrlState >> i); + short nOldStateVal = (short)(mnLastCtrlState >> i); if ( ( nCurStateVal & 0x01 ) != ( nOldStateVal & 0x01 ) ) { - bEnableControl = ( ( nCurStateVal & 0x01 ) == 0x01 ); + bool bEnableControl = ( ( nCurStateVal & 0x01 ) == 0x01 ); setControlProperty( msButtonIDs[i], "Enabled", uno::Any( bEnableControl ) ); } } diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index e49327e6a7ef..54db936536ca 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -1830,7 +1830,8 @@ bool HtmlExport::CreateHtmlForPresPages() case presentation::ClickAction_PREVPAGE: { - sal_uLong nPage = nSdPage; + sal_uLong nPage; + if (nSdPage == 0) nPage = 0; else diff --git a/svtools/source/contnr/simptabl.cxx b/svtools/source/contnr/simptabl.cxx index 720028e76ddc..dcb87ad40200 100644 --- a/svtools/source/contnr/simptabl.cxx +++ b/svtools/source/contnr/simptabl.cxx @@ -163,10 +163,10 @@ void SvSimpleTable::SetTabs() if ( nPrivTabCount > aHeaderBar.GetItemCount() ) nPrivTabCount = aHeaderBar.GetItemCount(); - sal_uInt16 i, nNewSize = static_cast< sal_uInt16 >( GetTab(0) ), nPos = 0; + sal_uInt16 i, nPos = 0; for ( i = 1; i < nPrivTabCount; ++i ) { - nNewSize = static_cast< sal_uInt16 >( GetTab(i) ) - nPos; + sal_uInt16 nNewSize = static_cast< sal_uInt16 >( GetTab(i) ) - nPos; aHeaderBar.SetItemSize( i, nNewSize ); nPos = (sal_uInt16)GetTab(i); } @@ -185,7 +185,6 @@ void SvSimpleTable::Paint( const Rectangle& rRect ) SvHeaderTabListBox::Paint(rRect ); sal_uInt16 nPrivTabCount = TabCount(); - sal_uInt16 nNewSize = ( nPrivTabCount > 0 ) ? (sal_uInt16)GetTab(0) : 0; long nOffset=-GetXOffset(); nOldPos=nOffset; @@ -201,7 +200,7 @@ void SvSimpleTable::Paint( const Rectangle& rRect ) sal_uInt16 nPos = 0; for(sal_uInt16 i=1;i<nPrivTabCount;i++) { - nNewSize = static_cast< sal_uInt16 >( GetTab(i) ) - nPos; + sal_uInt16 nNewSize = static_cast< sal_uInt16 >( GetTab(i) ) - nPos; aHeaderBar.SetItemSize( i, nNewSize ); nPos= static_cast< sal_uInt16 >( GetTab(i) ); } diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 37f65027f961..2e9726069366 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1018,12 +1018,11 @@ void Edit::ImplPaintBorder( long nXStart, long nXEnd ) if( ImplUseNativeBorder( GetStyle() ) || IsPaintTransparent() ) { // draw the inner part by painting the whole control using its border window - Window *pControl = this; Window *pBorder = GetWindow( WINDOW_BORDER ); if( pBorder == this ) { // we have no border, use parent - pControl = mbIsSubEdit ? GetParent() : this; + Window *pControl = mbIsSubEdit ? GetParent() : this; pBorder = pControl->GetWindow( WINDOW_BORDER ); if( pBorder == this ) pBorder = GetParent(); |