From 92c8d74c543aa94cd512369072975dca7006d5b3 Mon Sep 17 00:00:00 2001 From: Michaël Lefèvre Date: Mon, 21 Sep 2015 15:11:57 +0200 Subject: CppCheck : reduce variables scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ief402017b693a4337f330fb07bb7a6dc6e749f72 Reviewed-on: https://gerrit.libreoffice.org/18753 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- connectivity/source/drivers/macab/MacabRecords.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx index 6e3dbeaea7b0..0423a2c3bd14 100644 --- a/connectivity/source/drivers/macab/MacabRecords.cxx +++ b/connectivity/source/drivers/macab/MacabRecords.cxx @@ -381,7 +381,6 @@ MacabHeader *MacabRecords::createHeaderForRecordType(const CFArrayRef _records, /* While searching through the properties for required properties, these * sal_Bools will keep track of what we have found. */ - bool bFoundProperty; bool bFoundRequiredProperties[numRequiredProperties]; @@ -411,8 +410,8 @@ MacabHeader *MacabRecords::createHeaderForRecordType(const CFArrayRef _records, /* Determine the non-required properties... */ for(i = 0; i < numProperties; i++) { + bool bFoundProperty = false; property = static_cast(CFArrayGetValueAtIndex(allProperties, i)); - bFoundProperty = false; for(j = 0; j < numRequiredProperties; j++) { if(CFEqual(property, requiredProperties[j])) -- cgit