From ccc5ea08d64c38a9ce925d448c3010aca19ed35c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 12 Oct 2015 07:45:01 +0200 Subject: cppcheck:variableScope Change-Id: I037feb335499629300309851dcda3bb661f03d4f Reviewed-on: https://gerrit.libreoffice.org/19316 Tested-by: Jenkins Reviewed-by: Noel Grandin --- l10ntools/source/xmlparse.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'l10ntools/source') diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx index 00c05cfffe79..becad85f6a2e 100644 --- a/l10ntools/source/xmlparse.cxx +++ b/l10ntools/source/xmlparse.cxx @@ -431,7 +431,6 @@ XMLFile& XMLFile::operator=(const XMLFile& rObj) void XMLFile::SearchL10NElements( XMLChildNode *pCur, int nPos ) { - bool bInsert = true; if ( !pCur ) SearchL10NElements( this ); else @@ -453,6 +452,7 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur, int nPos ) break; case XML_NODE_TYPE_ELEMENT: { + bool bInsert = true; XMLElement *pElement = static_cast(pCur); const OString sName(pElement->GetName().toAsciiLowerCase()); OString sLanguage, sTmpStrVal, sOldref; @@ -507,7 +507,6 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur ) { static bool bStatusExport = true; - bool bInsert = true; if ( !pCur ) CheckExportStatus( this ); else { @@ -532,7 +531,7 @@ bool XMLFile::CheckExportStatus( XMLParentNode *pCur ) { if ( pElement->GetAttributeList()) { - for (size_t j = 0 , cnt = pElement->GetAttributeList()->size(); j < cnt && bInsert; ++j) + for (size_t j = 0 , cnt = pElement->GetAttributeList()->size(); j < cnt; ++j) { const OString tmpStr((*pElement->GetAttributeList())[j]->GetName()); if (tmpStr.equalsIgnoreAsciiCase("STATUS")) -- cgit