[Libreoffice-commits] .: lotuswordpro/source
Julien Nabet
serval2412 at kemper.freedesktop.org
Fri Sep 9 14:21:41 PDT 2011
lotuswordpro/source/filter/lwpobjhdr.cxx | 4 ++--
lotuswordpro/source/filter/lwptools.cxx | 2 +-
lotuswordpro/source/filter/tocread.cxx | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit ac015eb157d8d4ac548880f8321400834ff3d02d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Fri Sep 9 23:20:45 2011 +0200
Some cppcheck cleaning
diff --git a/lotuswordpro/source/filter/lwpobjhdr.cxx b/lotuswordpro/source/filter/lwpobjhdr.cxx
index e2e5e1b..4e9dd2a 100644
--- a/lotuswordpro/source/filter/lwpobjhdr.cxx
+++ b/lotuswordpro/source/filter/lwpobjhdr.cxx
@@ -76,11 +76,9 @@ LwpObjectHeader::LwpObjectHeader()
*/
bool LwpObjectHeader::Read(LwpSvStream &rStrm)
{
- sal_uInt8 nFlagBits = 0;
sal_uInt32 nVersionID = 0;
sal_uInt32 nRefCount = 0;
sal_uInt32 nNextVersionOffset = 0;
- sal_uInt32 nNextVersionID = 0;
sal_uInt32 nHeaderSize = 0;
sal_Int64 nStartPos = rStrm.Tell();
@@ -101,6 +99,7 @@ bool LwpObjectHeader::Read(LwpSvStream &rStrm)
if ((m_nTag == TAG_AMI) || ( LwpFileHeader::m_nFileRevision < 0x0006))
{
+ sal_uInt32 nNextVersionID = 0;
rStrm >> nNextVersionID;
nHeaderSize += sizeof(nNextVersionID);
}
@@ -108,6 +107,7 @@ bool LwpObjectHeader::Read(LwpSvStream &rStrm)
}
else
{
+ sal_uInt8 nFlagBits = 0;
sal_uInt16 VOType = 0;
rStrm >> VOType;
rStrm >> nFlagBits;
diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx
index f8c206d..1a3e1ae 100644
--- a/lotuswordpro/source/filter/lwptools.cxx
+++ b/lotuswordpro/source/filter/lwptools.cxx
@@ -92,10 +92,10 @@ sal_uInt16 LwpTools::QuickReadUnicode(LwpObjectStream* pObjStrm,
sal_uInt16 readLen = 0;
OUStringBuffer strBuf(128);
- sal_uInt16 len = 0;
if( !IsUnicodePacked(pObjStrm, strlen) )
{
+ sal_uInt16 len = 0;
sal_Char buf[1024];
while(strlen)
diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx
index 42d376b..95027bb 100644
--- a/lotuswordpro/source/filter/tocread.cxx
+++ b/lotuswordpro/source/filter/tocread.cxx
@@ -151,11 +151,11 @@ CBenTOCReader::SearchForLabel(BenByte * pLabel)
if (Length - CurrOffset > MAX_SEARCH_AMOUNT)
break;
- unsigned long UsedBufferSize;
// If before beginning of buffer
if (CurrOffset - BEN_MAGIC_BYTES_SIZE < BufferStartOffset)
{
+ unsigned long UsedBufferSize;
if (CurrOffset < LABEL_READ_BUFFER_SIZE)
UsedBufferSize = CurrOffset;
else UsedBufferSize = LABEL_READ_BUFFER_SIZE;
More information about the Libreoffice-commits
mailing list