Hello,
Here is a patch for 2 memleaks + 1 assigned a value that is never used
Compiling was ok
Julien
(LGPLv3+ / MPL)
commit 29e339267845268669dbecb036eb11fbe539d9ef
Author: Julien Nabet <serval2412@yahoo.fr>
Date: Sun Dec 26 17:04:32 2010 +0100
cppcheck cleaning in writer
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 3dec37b..3842154 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -997,6 +997,7 @@ ULONG SwCursor::FindAll( SwFindParas& rParas,
}
else
DeleteMark();
+ delete pSav;
return 0;
}
@@ -1051,6 +1052,7 @@ ULONG SwCursor::FindAll( SwFindParas& rParas,
}
else
DeleteMark();
+ delete pSav;
return 0;
}
// es wurde ein- bis mehrmals gefunden. Das steht alles
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index f466c34..fc6266e 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -120,8 +120,7 @@ BOOL SwCrsrShell::GoNextCell( BOOL bAppendLine )
BOOL SwCrsrShell::GoPrevCell()
{
BOOL bRet = FALSE;
- const SwTableNode* pTblNd;
- if( IsTableMode() || 0 != ( pTblNd = IsCrsrInTbl() ))
+ if( IsTableMode() || IsCrsrInTbl() )
{
SwCursor* pCrsr = pTblCrsr ? pTblCrsr : pCurCrsr;
SwCallLink aLk( *this ); // Crsr-Moves ueberwachen,
Context
- [Libreoffice] [PATCH] cppcheck cleaning in writer · Julien Nabet
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.