summaryrefslogtreecommitdiffstats
path: root/Utilities/cmxmlrpc/xmlrpc_array.c
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-27 22:36:00 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-27 22:36:00 (GMT)
commit588653c4e8f16ab6f2cd5e552782057b5e679c9f (patch)
tree2584fd6ad674818a370ebd96cbf6bd6c8243e968 /Utilities/cmxmlrpc/xmlrpc_array.c
parent8946d2f55e1042dbcfb5faa37d558c46cdea0eb1 (diff)
downloadCMake-588653c4e8f16ab6f2cd5e552782057b5e679c9f.zip
CMake-588653c4e8f16ab6f2cd5e552782057b5e679c9f.tar.gz
CMake-588653c4e8f16ab6f2cd5e552782057b5e679c9f.tar.bz2
COMP: Remove warnings about shadow variables
Diffstat (limited to 'Utilities/cmxmlrpc/xmlrpc_array.c')
-rw-r--r--Utilities/cmxmlrpc/xmlrpc_array.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/Utilities/cmxmlrpc/xmlrpc_array.c b/Utilities/cmxmlrpc/xmlrpc_array.c
index fc56382..31576f0 100644
--- a/Utilities/cmxmlrpc/xmlrpc_array.c
+++ b/Utilities/cmxmlrpc/xmlrpc_array.c
@@ -30,10 +30,10 @@ xmlrpc_abort_if_array_bad(xmlrpc_value * const arrayP) {
if (contents == NULL)
abort();
else {
- unsigned int index;
+ unsigned int xmIndex;
- for (index = 0; index < arraySize; ++index) {
- xmlrpc_value * const itemP = contents[index];
+ for (xmIndex = 0; xmIndex < arraySize; ++xmIndex) {
+ xmlrpc_value * const itemP = contents[xmIndex];
if (itemP == NULL)
abort();
else if (itemP->_refcount < 1)
@@ -56,13 +56,13 @@ xmlrpc_destroyArrayContents(xmlrpc_value * const arrayP) {
xmlrpc_value ** const contents =
XMLRPC_MEMBLOCK_CONTENTS(xmlrpc_value*, &arrayP->_block);
- unsigned int index;
+ unsigned int xmIndex;
XMLRPC_ASSERT_ARRAY_OK(arrayP);
/* Release our reference to each item in the array */
- for (index = 0; index < arraySize; ++index) {
- xmlrpc_value * const itemP = contents[index];
+ for (xmIndex = 0; xmIndex < arraySize; ++xmIndex) {
+ xmlrpc_value * const itemP = contents[xmIndex];
xmlrpc_DECREF(itemP);
}
XMLRPC_MEMBLOCK_CLEAN(xmlrpc_value *, &arrayP->_block);
@@ -125,7 +125,7 @@ xmlrpc_array_append_item(xmlrpc_env * const envP,
void
xmlrpc_array_read_item(xmlrpc_env * const envP,
const xmlrpc_value * const arrayP,
- unsigned int const index,
+ unsigned int const xmIndex,
xmlrpc_value ** const valuePP) {
XMLRPC_ASSERT_ENV_OK(envP);
@@ -142,12 +142,12 @@ xmlrpc_array_read_item(xmlrpc_env * const envP,
size_t const size =
XMLRPC_MEMBLOCK_SIZE(xmlrpc_value *, &arrayP->_block);
- if (index >= size)
+ if (xmIndex >= size)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_INDEX_ERROR, "Array index %u is beyond end "
- "of %u-item array", index, (unsigned int)size);
+ "of %u-item array", xmIndex, (unsigned int)size);
else {
- *valuePP = contents[index];
+ *valuePP = contents[xmIndex];
xmlrpc_INCREF(*valuePP);
}
}
@@ -158,15 +158,15 @@ xmlrpc_array_read_item(xmlrpc_env * const envP,
xmlrpc_value *
xmlrpc_array_get_item(xmlrpc_env * const envP,
const xmlrpc_value * const arrayP,
- int const index) {
+ int const xmIndex) {
xmlrpc_value * valueP;
- if (index < 0)
+ if (xmIndex < 0)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_INDEX_ERROR, "Index %d is negative.");
else {
- xmlrpc_array_read_item(envP, arrayP, index, &valueP);
+ xmlrpc_array_read_item(envP, arrayP, xmIndex, &valueP);
if (!envP->fault_occurred)
xmlrpc_DECREF(valueP);