From: Julian Seward Date: Sun, 11 Nov 2007 05:59:22 +0000 (+0000) Subject: Avoid compilation warnings from gcc-3.2 (about 'index' shadowing a built-in global) X-Git-Tag: svn/VALGRIND_3_3_0~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eb7b05a75d93f2a6c31d8259e440a42093b5001;p=thirdparty%2Fvalgrind.git Avoid compilation warnings from gcc-3.2 (about 'index' shadowing a built-in global) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7145 --- diff --git a/exp-omega/o_main.c b/exp-omega/o_main.c index d35a228650..8b63b5e89e 100644 --- a/exp-omega/o_main.c +++ b/exp-omega/o_main.c @@ -3130,16 +3130,16 @@ static UInt o_buildMemblockTree(void) ** We dont do anything to balance things so this could decompose to a ** linear structure. Thankfully, we are not in a time critical section. */ - UInt index; + UInt indx; o_memblockList = (MemBlock **)VG_(HT_to_array)(o_MemBlocks, &o_memblockListCount); - for(index = 0; index < o_memblockListCount; index++) + for(indx = 0; indx < o_memblockListCount; indx++) { TreeNode **parent = NULL; TreeNode *tn = NULL; - MemBlock *mb = o_memblockList[index]; + MemBlock *mb = o_memblockList[indx]; /* ** Only process main blocks that havent leaked. @@ -3178,11 +3178,11 @@ static UInt o_buildMemblockTree(void) static void o_checkExternalPointers(void) { - UInt index; + UInt indx; - for(index = 0; index < o_memblockListCount; index++) + for(indx = 0; indx < o_memblockListCount; indx++) { - MemBlock *mb = o_memblockList[index]; + MemBlock *mb = o_memblockList[indx]; /* ** Only check blocks that haven't leaked. @@ -3211,7 +3211,7 @@ static void o_checkExternalPointers(void) static void o_rippleExternelPointers(MemBlock *mb) { - UInt index; + UInt indx; if(!mb) { @@ -3219,12 +3219,12 @@ static void o_rippleExternelPointers(MemBlock *mb) ** Iterate through the memory block list marking external blocks ** so that we dont process the same blocks twice. */ - for(index = 0; index < o_memblockListCount; index++) + for(indx = 0; indx < o_memblockListCount; indx++) { - if(o_memblockList[index]->external > 0) + if(o_memblockList[indx]->external > 0) { - o_memblockList[index]->external = -1; - o_rippleExternelPointers(o_memblockList[index]); + o_memblockList[indx]->external = -1; + o_rippleExternelPointers(o_memblockList[indx]); } } } @@ -3271,16 +3271,16 @@ static int o_reportCircularBlocks(void) { int count = 0; BlockRecord *block = NULL; - int index; + int indx; /* ** Iterate through the memory block list reporting any blocks not marked ** as external. ** We aggregate the list of blocks as many could come from the same context. */ - for(index = 0; index < o_memblockListCount; index++) + for(indx = 0; indx < o_memblockListCount; indx++) { - MemBlock * mb = o_memblockList[index]; + MemBlock * mb = o_memblockList[indx]; if(!mb->shadowing && !mb->leaked && mb->external == 0) { block = o_findBlockRecord(&o_circularRecords, mb->where, NULL);