[Libreoffice-commits] .: 14 commits - autodoc/source connectivity/source cosv/source filter/source idlc/source l10ntools/source sdext/source slideshow/source store/source sw/source tools/source vcl/win
Pierre-André Jacquod
pjacquod at kemper.freedesktop.org
Tue Sep 6 13:44:41 PDT 2011
autodoc/source/ary/cpp/ca_ce.cxx | 4 --
autodoc/source/display/idl/hfi_typetext.cxx | 15 ++--------
connectivity/source/drivers/dbase/DNoException.cxx | 3 --
cosv/source/strings/streamstr.cxx | 3 --
filter/source/graphicfilter/icgm/class4.cxx | 4 --
idlc/source/idlccompile.cxx | 3 --
l10ntools/source/help/HelpLinker.cxx | 1
sdext/source/pdfimport/tree/writertreevisiting.cxx | 4 --
slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx | 3 --
store/source/storcach.cxx | 3 --
sw/source/core/doc/docchart.cxx | 3 --
sw/source/ui/dochdl/swdtflvr.cxx | 3 --
tools/source/generic/config.cxx | 3 --
vcl/win/source/gdi/winlayout.cxx | 2 -
14 files changed, 12 insertions(+), 42 deletions(-)
New commits:
commit 3d411ec522dfb13924da5dadb28883d33f8e5794
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Sun Sep 4 21:47:35 2011 +0200
[cppchecker] unread Variable warning suppressed
diff --git a/connectivity/source/drivers/dbase/DNoException.cxx b/connectivity/source/drivers/dbase/DNoException.cxx
index 357b2ba..2db5bc8 100644
--- a/connectivity/source/drivers/dbase/DNoException.cxx
+++ b/connectivity/source/drivers/dbase/DNoException.cxx
@@ -130,7 +130,6 @@ End:
sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbase", "Ocke.Janssen at sun.com", "ODbaseTable::ReadMemo" );
- bool bIsText = true;
m_pMemoStream->Seek(nBlockNo * m_aMemoHeader.db_size);
switch (m_aMemoHeader.db_typ)
@@ -173,8 +172,6 @@ sal_Bool ODbaseTable::ReadMemo(sal_uIntPtr nBlockNo, ORowSetValue& aVariable)
{
return sal_False;
}
-
- bIsText = sHeader[3] != 0;
}
else if (((sal_uInt8)sHeader[0]) != 0xFF || ((sal_uInt8)sHeader[1]) != 0xFF || ((sal_uInt8)sHeader[2]) != 0x08)
{
commit 899e9848cfa7c3a6f649f362acee53a4057768be
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Sun Sep 4 21:35:25 2011 +0200
[cppchecker] suppress unread Variable warnings
diff --git a/autodoc/source/display/idl/hfi_typetext.cxx b/autodoc/source/display/idl/hfi_typetext.cxx
index 574de30..43ae07b 100644
--- a/autodoc/source/display/idl/hfi_typetext.cxx
+++ b/autodoc/source/display/idl/hfi_typetext.cxx
@@ -179,12 +179,8 @@ HF_IdlTypeText::Produce_byData( const String & i_sFullName ) const
}
csv::erase_container(aModule_);
- bool bFound = // KORR : Check the semantics of this, see if ce really exists, if it is a member?
- Env().Data().Search_Ce( aModule_,
- sCe,sMember,
- sTypeText,
- *pScopeModule );
- if (NOT bFound)
+
+ if (NOT ( Env().Data().Search_Ce(aModule_, sCe,sMember, sTypeText, *pScopeModule) ) )
{
if ( strchr(sTypeText,':') == 0
AND
@@ -223,12 +219,7 @@ HF_IdlTypeText::Produce_LinkInDocu( const String & i_scope,
return;
}
- bool
- bFound = Env().Data().Search_CesModule( aModule_,
- i_scope,
- i_name,
- *pScopeModule );
- if (NOT bFound)
+ if (NOT ( Env().Data().Search_CesModule( aModule_, i_scope, i_name, *pScopeModule) ) )
{
CurOut() << i_scope << "::" << i_name;
if (NOT i_member.empty())
commit 7a83696a76e576ce230988b092b1152ac18f42b7
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Sun Sep 4 21:14:48 2011 +0200
[cppchecker] superfluous variable deleted
diff --git a/autodoc/source/ary/cpp/ca_ce.cxx b/autodoc/source/ary/cpp/ca_ce.cxx
index ea49b14..b2ceb27 100644
--- a/autodoc/source/ary/cpp/ca_ce.cxx
+++ b/autodoc/source/ary/cpp/ca_ce.cxx
@@ -450,9 +450,7 @@ CeAdmin::Get_SignatureText( StreamStr & o_rOut,
? i_sParameterNames->end()
: aDummy.end();
- bool
- bEmpty = (it == it_end);
- if (NOT bEmpty)
+ if (NOT (it == it_end) )
{
o_rOut << "( ";
Types().Get_TypeText(o_rOut, *it);
commit 3979fb5b59d79d3f48cf0656e58ec848cff5a723
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Sun Sep 4 21:07:58 2011 +0200
[cppchecker] deletion of unread variable
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 4889642..1a76bf5 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -122,7 +122,6 @@ void IndexerPreProcessor::processDocument
if( pResNodeCaption )
{
fs::path fsCaptionPureTextFile_docURL = m_fsCaptionFilesDirName / aStdStr_EncodedDocPathURL;
- std::string aCaptionPureTextFileStr_docURL = fsCaptionPureTextFile_docURL.native_file_string();
#ifdef WNT //We need _wfopen to support long file paths on Windows XP
FILE* pFile_docURL = _wfopen(
fsCaptionPureTextFile_docURL.native_file_string_w(), L"w" );
commit 7eb5645e7380c0f05645648ef7d225e9d44c28d6
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Sun Sep 4 20:55:48 2011 +0200
[cppchecker] unread variable deleted
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx
index b148fe6..4d556e9 100644
--- a/filter/source/graphicfilter/icgm/class4.cxx
+++ b/filter/source/graphicfilter/icgm/class4.cxx
@@ -465,11 +465,8 @@ void CGM::ImplDoClass4()
double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint );
double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint );
- int nSwitch = 0;
-
if ( fStartAngle > fEndAngle )
{
- nSwitch ^=1;
aIntermediatePoint = aEndingPoint;
aEndingPoint = aStartingPoint;
aStartingPoint = aIntermediatePoint;
@@ -479,7 +476,6 @@ void CGM::ImplDoClass4()
}
if ( ! ( fInterAngle > fStartAngle ) && ( fInterAngle < fEndAngle ) )
{
- nSwitch ^=1;
aIntermediatePoint = aEndingPoint;
aEndingPoint = aStartingPoint;
aStartingPoint = aIntermediatePoint;
commit 7f90f8af5fbaf2305c6e9da58fb6a0e36b2c331e
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Sun Sep 4 19:53:21 2011 +0200
[cppchecker] deletion of supperfluous variable
diff --git a/cosv/source/strings/streamstr.cxx b/cosv/source/strings/streamstr.cxx
index 7fe0d35..f13f13d 100644
--- a/cosv/source/strings/streamstr.cxx
+++ b/cosv/source/strings/streamstr.cxx
@@ -419,9 +419,8 @@ StreamStr::operator_read_line( bstream & i_src )
operator<<(c);
}
- bool bEndOfStream = nCount == 0;
// Check for line-end:
- if ( NOT bEndOfStream AND c != 0 )
+ if ( NOT (nCount == 0) AND c != 0 )
{
char oldc = c;
if (i_src.read(&c, 1) == 1)
commit 48f69c30721c424dfce98bf6486400df72ab82f7
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Sun Sep 4 19:35:20 2011 +0200
[cppchecker] deletion of unread / unneeded variable
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index e660a00..5f4ff7b 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -201,14 +201,13 @@ sal_Bool copyFile(const OString* source, const OString& target)
size_t totalSize = 512;
size_t readSize = 0;
- size_t writeSize = 0;
char pBuffer[513];
while ( !feof(pSource) )
{
if ( (readSize = fread(pBuffer, 1, totalSize, pSource)) > 0 && !ferror(pSource) )
{
- if ( (writeSize = fwrite(pBuffer, 1, readSize, pTarget)) != readSize || ferror(pTarget) )
+ if ( (fwrite(pBuffer, 1, readSize, pTarget)) != readSize || ferror(pTarget) )
{
if (source != 0) {
fclose(pSource);
commit 1d7e004c1eac97fd94a64490f5d629c8c6b5183f
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Sun Sep 4 19:27:56 2011 +0200
[cppchecker] deletion of unneeded variables
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index f01fb95..a2af4a4 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -959,17 +959,13 @@ void WriterXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element
// check for center alignement
// criterion: paragraph is small relative to parent and distributed around its center
double p_x = elem.Parent->x;
- double p_y = elem.Parent->y;
double p_w = elem.Parent->w;
- double p_h = elem.Parent->h;
PageElement* pPage = dynamic_cast<PageElement*>(elem.Parent);
if( pPage )
{
p_x += pPage->LeftMargin;
- p_y += pPage->TopMargin;
p_w -= pPage->LeftMargin+pPage->RightMargin;
- p_h -= pPage->TopMargin+pPage->BottomMargin;
}
bool bIsCenter = false;
if( elem.w < ( p_w/2) )
commit 6f94c644c3c0c08b245d66519ff7116c54d600b6
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Mon Aug 29 09:53:08 2011 +0200
[cppchecker] suppression of unread Variable
diff --git a/store/source/storcach.cxx b/store/source/storcach.cxx
index 79c3449..61d4232 100644
--- a/store/source/storcach.cxx
+++ b/store/source/storcach.cxx
@@ -350,7 +350,7 @@ PageCache_Impl::PageCache_Impl (sal_uInt16 nPageSize)
PageCache_Impl::~PageCache_Impl()
{
- double s_x = 0.0, s_xx = 0.0;
+ double s_x = 0.0;
sal_Size i, n = m_hash_size;
for (i = 0; i < n; i++)
{
@@ -364,7 +364,6 @@ PageCache_Impl::~PageCache_Impl()
x += 1;
}
s_x += double(x);
- s_xx += double(x) * double(x);
}
double ave = s_x / double(n);
OSL_TRACE("ave hash chain length: %g", ave);
commit 7d146bdf4ccb9d0e2190a1ae85643a18ffb9601d
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Mon Aug 29 09:31:04 2011 +0200
[cppchecker] deleting unread variable
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 8da8d8c..cfc8205 100755
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -3432,8 +3432,7 @@ SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
bDelBookmrk( sal_False ), bInDisconnect( sal_False )
{
// we only end up here with table- or text selection
- const int nSelection = rSh.GetSelectionType();
- if( nsSelectionType::SEL_TBL_CELLS & nSelection )
+ if( nsSelectionType::SEL_TBL_CELLS & rSh.GetSelectionType() )
{
SwFrmFmt* pFmt = rSh.GetTableFmt();
if( pFmt )
commit efce802d3a52e2fc9843ca0da3472656c6025a0b
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Mon Aug 29 09:23:10 2011 +0200
[cppcheker] delete unread variable
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index fb879ea..d72ed8a 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -103,8 +103,7 @@ static sal_uIntPtr ImplSysGetConfigTimeStamp( const XubString& rFileName )
::osl::DirectoryItem aItem;
::osl::FileStatus aStatus( osl_FileStatus_Mask_ModifyTime );
- int nError = 0;
- if( ( nError = ::osl::DirectoryItem::get( rFileName, aItem ) ) == ::osl::FileBase::E_None &&
+ if( ::osl::DirectoryItem::get( rFileName, aItem ) == ::osl::FileBase::E_None &&
aItem.getFileStatus( aStatus ) == ::osl::FileBase::E_None )
{
nTimeStamp = aStatus.getModifyTime().Seconds;
commit 40620d716b9f07924fe8896ca59753858b259d65
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Mon Aug 29 09:13:48 2011 +0200
[cppchecker] local variable deleted
this local declaration makes no sense, based on the previous code, it seems
this is a rest of the former code change
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 6eb423f..a7989a7 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -692,7 +692,7 @@ long SimpleWinLayout::FillDXArray( long* pDXArray ) const
{
if( !mnWidth )
{
- long mnWidth = mnBaseAdv;
+ mnWidth = mnBaseAdv;
for( int i = 0; i < mnGlyphCount; ++i )
mnWidth += mpGlyphAdvances[ i ];
}
commit 80bf270d9b461261335103bbd6625345ec3c9d78
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Fri Aug 26 22:13:20 2011 +0200
[cppchecker] deletion of not needed variable
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index 7297413..69b5a42 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -141,10 +141,9 @@ void SwDoc::_UpdateCharts( const SwTable& rTbl, ViewShell& rVSh ) const
while( 0 != (pStNd = aIdx.GetNode().GetStartNode()) )
{
aIdx++;
- SwFrm* pFrm;
if( 0 != ( pONd = aIdx.GetNode().GetOLENode() ) &&
aName.Equals( pONd->GetChartTblName() ) &&
- 0 != ( pFrm = pONd->getLayoutFrm( rVSh.GetLayout() ) ) )
+ pONd->getLayoutFrm( rVSh.GetLayout() ) )
{
SwChartDataProvider *pPCD = GetChartDataProvider();
if (pPCD)
commit aa9fe644035959ab63115494886e18a836377255
Author: Pierre-André Jacquod <pjacquod at alumni.ethz.ch>
Date: Fri Aug 26 20:55:47 2011 +0200
[cppchecker] unread Variable within a #ifdef [WINT] removed
diff --git a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
index f9ce32c..b70b8ac 100644
--- a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
@@ -530,11 +530,10 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow )
#endif
#if defined( WNT )
- const SystemEnvData* pChildSysData = NULL;
SystemWindowData winData;
winData.nSize = sizeof(winData);
pWindow=new SystemChildWindow(pPWindow, 0, &winData, sal_False);
- pChildSysData = pWindow->GetSystemData();
+ const SystemEnvData* pChildSysData = pWindow->GetSystemData();
#endif
if( pWindow )
More information about the Libreoffice-commits
mailing list