diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2011-09-09 23:20:45 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2011-09-09 23:21:42 +0200 |
commit | ac015eb157d8d4ac548880f8321400834ff3d02d (patch) | |
tree | be95c23064367684abfbe6613890d507b7b56ca6 /lotuswordpro | |
parent | c6044b8afe1baad24f269160eaadaab2016f993c (diff) |
Some cppcheck cleaning
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/lwpobjhdr.cxx | 4 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwptools.cxx | 2 | ||||
-rw-r--r-- | lotuswordpro/source/filter/tocread.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lotuswordpro/source/filter/lwpobjhdr.cxx b/lotuswordpro/source/filter/lwpobjhdr.cxx index e2e5e1b33a18..4e9dd2a5cefa 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 f8c206d61619..1a3e1aec3bbe 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 42d376bcf15b..95027bbed9f6 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; |