Here are some patches removing unused variables found by cppcheck
Andy
>From f4907a0cda8c414fe27c42c24a262c0a761daf2e Mon Sep 17 00:00:00 2001
From: Andy Holder <[email protected]>
Date: Sun, 23 Jan 2011 23:44:23 +0000
Subject: [PATCH 1/5] cppcheck: Variables not used
---
binfilter/bf_sw/source/filter/w4w/sw_w4wpar3.cxx | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/binfilter/bf_sw/source/filter/w4w/sw_w4wpar3.cxx b/binfilter/bf_sw/source/filter/w4w/sw_w4wpar3.cxx
index 569420a..8ddcbad 100644
--- a/binfilter/bf_sw/source/filter/w4w/sw_w4wpar3.cxx
+++ b/binfilter/bf_sw/source/filter/w4w/sw_w4wpar3.cxx
@@ -1022,7 +1022,6 @@ BOOL SwW4WParser::Read_Analyze_FLO_PDT()// analysieren aller PDTs und ggfs.
// Header und Footer definieren
SwFrmFmt* pHdFmt = 0;
SwFrmFmt* pFtFmt = 0;
- W4WRectInfo& rRectInfo = *pRDTInfos->Get( rPDTInfo.nHdRectId );
if( pHdInfo )
{
rFrmFmt.SetAttr( SwFmtHeader( TRUE ));
@@ -1327,7 +1326,6 @@ void SwW4WParser::Read_TextRectangelId() // TRI
SwFrmFmt* pHdFmt = 0;
SwFrmFmt* pFtFmt = 0;
- W4WRectInfo& rRectInfo = *pRDTInfos->Get( pPDTInfo->nHdRectId );
if( pHdInfo )
{
pHdFmt = (SwFrmFmt*)pPageDesc->GetMaster().GetHeader().GetHeaderFmt();
--
1.7.3.5
>From 535c805fdd7e60a9626abe26b56f027ef5416a6c Mon Sep 17 00:00:00 2001
From: Andy Holder <[email protected]>
Date: Mon, 24 Jan 2011 00:00:15 +0000
Subject: [PATCH] cppcheck: unused variables
---
sw/source/ui/misc/num.cxx | 10 ----------
1 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index 25cf448..68212bf 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -205,10 +205,8 @@ void SwNumPositionTabPage::InitControls()
bool bSameIndentAt = bLabelAlignmentPosAndSpaceModeActive;
const SwNumFmt* aNumFmtArr[MAXLEVEL];
- const SwFmtVertOrient* pFirstOrient = 0;
USHORT nMask = 1;
USHORT nLvl = USHRT_MAX;
- long nFirstBorderText = 0;
long nFirstBorderTextRelative = -1;
for(USHORT i = 0; i < MAXLEVEL; i++)
{
@@ -218,14 +216,6 @@ void SwNumPositionTabPage::InitControls()
if(USHRT_MAX == nLvl)
{
nLvl = i;
- if ( !bLabelAlignmentPosAndSpaceModeActive )
- {
- pFirstOrient = aNumFmtArr[nLvl]->GetGraphicOrientation();
- nFirstBorderText = nLvl > 0 ?
- aNumFmtArr[nLvl]->GetAbsLSpace() + aNumFmtArr[nLvl]->GetFirstLineOffset() -
- aNumFmtArr[nLvl - 1]->GetAbsLSpace() + aNumFmtArr[nLvl - 1]->GetFirstLineOffset():
- aNumFmtArr[nLvl]->GetAbsLSpace() + aNumFmtArr[nLvl]->GetFirstLineOffset();
- }
}
if( i > nLvl)
--
1.7.3.5
>From b68ee287423b53adbc68fa146b89c3121d0e007e Mon Sep 17 00:00:00 2001
From: Andy Holder <[email protected]>
Date: Sun, 23 Jan 2011 23:47:56 +0000
Subject: [PATCH 2/5] cppcheck: variable assigned but never used
---
binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx b/binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx
index c39619b..1493258 100644
--- a/binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx
+++ b/binfilter/bf_sfx2/source/appl/sfx2_namecont.cxx
@@ -624,7 +624,6 @@ namespace SfxContainer_Impl
/*N*/
/*N*/ INetURLObject aUserBasic60InetObj = aUserBasic60InetObj_1;
/*N*/ String aFolder60 = aUserBasic60InetObj.GetMainURL( INetURLObject::NO_DECODE );
-/*N*/ bool bSecondTime = false;
/*N*/ if( mxSFI->isFolder( aFolder60 ) )
/*N*/ {
/*?*/ // #110101 Check if Standard folder exists and is complete
@@ -670,7 +669,6 @@ namespace SfxContainer_Impl
/*?*/ }
/*N*/ else
/*?*/ {
-/*?*/ bSecondTime = true;
/*?*/ aUserBasic60InetObj = aUserBasic60InetObj_2;
/*?*/ aFolder60 = aUserBasic60InetObj.GetMainURL( INetURLObject::NO_DECODE );
/*N*/ }
--
1.7.3.5
>From 7676ac2c470245043fb915c3fb7057327a51af14 Mon Sep 17 00:00:00 2001
From: Andy Holder <[email protected]>
Date: Sun, 23 Jan 2011 23:53:21 +0000
Subject: [PATCH 3/5] cppcheck: unused variable
---
binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx b/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx
index 9697b42..a8a569c 100644
--- a/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx
+++ b/binfilter/bf_svx/source/svdraw/svx_svdotxln.cxx
@@ -98,7 +98,6 @@ namespace binfilter {
/*?*/ void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/,
/*?*/ const ::com::sun::star::uno::Any & /*rValue*/ )
/*?*/ {
-/*?*/ bool bForceReload=FALSE;
/*?*/ SdrModel* pModel = pSdrObj ? pSdrObj->GetModel() : 0;
/*?*/ SvxLinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
/*?*/ if( pLinkManager )
@@ -116,7 +115,6 @@ namespace binfilter {
/*?*/ pData->aFileName = aFile;
/*?*/ pData->aFilterName = aFilter;
/*?*/ pSdrObj->SetChanged();
-/*?*/ bForceReload = TRUE;
/*?*/ }
/*?*/ }
/*?*/ }
--
1.7.3.5
>From 22c78223c59528273b818ebc5c943412006ae796 Mon Sep 17 00:00:00 2001
From: Andy Holder <[email protected]>
Date: Mon, 24 Jan 2011 00:04:44 +0000
Subject: [PATCH 4/5] ccpcheck: unused variable
---
binfilter/bf_sd/source/ui/unoidl/sd_unoobj.cxx | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/binfilter/bf_sd/source/ui/unoidl/sd_unoobj.cxx b/binfilter/bf_sd/source/ui/unoidl/sd_unoobj.cxx
index 4d62438..d3fa913 100644
--- a/binfilter/bf_sd/source/ui/unoidl/sd_unoobj.cxx
+++ b/binfilter/bf_sd/source/ui/unoidl/sd_unoobj.cxx
@@ -1063,10 +1063,6 @@ void SdXShape::SetStyleSheet( const uno::Any& rAny ) throw( lang::IllegalArgumen
throw lang::IllegalArgumentException();
pObj->SetStyleSheet( (SfxStyleSheet*)pStyleSheet->getStyleSheet(), sal_False );
-
- SdDrawDocument* pDoc = NULL;
- if (mpModel)
- pDoc = mpModel->GetDoc();
}
uno::Any SdXShape::GetStyleSheet() const throw( beans::UnknownPropertyException )
--
1.7.3.5
>From 3127ab2bffcba8dd771a1d8891da0bb07ed40b91 Mon Sep 17 00:00:00 2001
From: Andy Holder <[email protected]>
Date: Mon, 24 Jan 2011 00:13:24 +0000
Subject: [PATCH 5/5] cppcheck: unused variable
---
hwpfilter/source/drawing.h | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h
index 9a9e797..d8925bc 100644
--- a/hwpfilter/source/drawing.h
+++ b/hwpfilter/source/drawing.h
@@ -187,7 +187,7 @@ static bool SkipUnusedField(void)
static bool LoadCommonHeader(HWPDrawingObject * hdo, WORD * link_info)
{
- uint size, property_size, common_size;
+ uint size, common_size;
if( !hmem )
return FALSE;
@@ -202,7 +202,6 @@ static bool LoadCommonHeader(HWPDrawingObject * hdo, WORD * link_info)
}
common_size = HDOFILE_COMMON_SIZE;
- property_size = 44;
hdo->type = hmem->read2b();
*link_info = sal::static_int_cast<WORD>(hmem->read2b());
hdo->offset.x = hmem->read4b();
--
1.7.3.5
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice