[Libreoffice-commits] libcdr.git: src/lib
Julien Nabet
serval2412 at yahoo.fr
Sun Nov 3 12:19:09 CET 2013
src/lib/CMXParser.cpp | 4 ++--
src/lib/libcdr_utils.cpp | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit a0177028897b054e8ac807f818b3d1eae5d44850
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sun Nov 3 12:18:45 2013 +0100
Some cppcheck cleaning
Change-Id: I559eaa5195f2f88ae79349162e136e845d462e9f
diff --git a/src/lib/CMXParser.cpp b/src/lib/CMXParser.cpp
index 64dc906..e2f0b30 100644
--- a/src/lib/CMXParser.cpp
+++ b/src/lib/CMXParser.cpp
@@ -638,14 +638,14 @@ libcdr::CDRBox libcdr::CMXParser::readBBox(WPXInputStream *input)
void libcdr::CMXParser::readFill(WPXInputStream *input)
{
- unsigned char tagId = 0;
- unsigned short tagLength = 0;
unsigned fillIdentifier = readU16(input, m_bigEndian);
switch (fillIdentifier)
{
case 1:
if (m_precision == libcdr::PRECISION_32BIT)
{
+ unsigned char tagId = 0;
+ unsigned short tagLength = 0;
do
{
long startOffset = input->tell();
diff --git a/src/lib/libcdr_utils.cpp b/src/lib/libcdr_utils.cpp
index 3b095d1..6ecc8d3 100644
--- a/src/lib/libcdr_utils.cpp
+++ b/src/lib/libcdr_utils.cpp
@@ -119,7 +119,6 @@ static unsigned short getEncoding(const unsigned char *buffer, unsigned bufferLe
return 0;
UErrorCode status = U_ZERO_ERROR;
UCharsetDetector *csd = 0;
- const UCharsetMatch *csm = 0;
try
{
csd = ucsdet_open(&status);
@@ -129,7 +128,7 @@ static unsigned short getEncoding(const unsigned char *buffer, unsigned bufferLe
ucsdet_setText(csd, (const char *)buffer, bufferLength, &status);
if (U_FAILURE(status))
throw libcdr::EncodingException();
- csm = ucsdet_detect(csd, &status);
+ const UCharsetMatch *csm = ucsdet_detect(csd, &status);
if (U_FAILURE(status) || !csm)
throw libcdr::EncodingException();
const char *name = ucsdet_getName(csm, &status);
More information about the Libreoffice-commits
mailing list