[kaffe] CVS kaffe (robilad): Small warning fix

Kaffe CVS cvs-commits at kaffe.org
Sun Feb 6 07:11:06 PST 2005


PatchSet 5481 
Date: 2005/02/06 15:05:06
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Small warning fix

2005-02-06  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/gcFuncs.c: Replaced 'index' by 'objIndex' to
        fix compiler warnings about shadowed symbols.

Members: 
	ChangeLog:1.3527->1.3528 
	kaffe/kaffevm/gcFuncs.c:1.65->1.66 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3527 kaffe/ChangeLog:1.3528
--- kaffe/ChangeLog:1.3527	Sun Feb  6 14:57:46 2005
+++ kaffe/ChangeLog	Sun Feb  6 15:05:06 2005
@@ -1,5 +1,10 @@
 2005-02-06  Dalibor Topic  <robilad at kaffe.org>
 
+	* kaffe/kaffevm/gcFuncs.c: Replaced 'index' by 'objIndex' to 
+	fix compiler warnings about shadowed symbols.
+
+2005-02-06  Dalibor Topic  <robilad at kaffe.org>
+
 	* kaffe/kaffevm/jni/jni-base.c (KaffeJNI_ParseUserProperty):
 	Factored out of KaffeJNI_ParseArgs to fix compiler warning,
 	and simplify code a bit. Added comments.
Index: kaffe/kaffe/kaffevm/gcFuncs.c
diff -u kaffe/kaffe/kaffevm/gcFuncs.c:1.65 kaffe/kaffe/kaffevm/gcFuncs.c:1.66
--- kaffe/kaffe/kaffevm/gcFuncs.c:1.65	Sun Jan 30 18:21:38 2005
+++ kaffe/kaffe/kaffevm/gcFuncs.c	Sun Feb  6 15:05:10 2005
@@ -247,19 +247,20 @@
 walkMethods(Collector* collector, void *gc_info, Method* m, int nm)
 {
         while (nm-- > 0) {
-	        int index;
+	        int objIndex;
 
                 KGC_markObject(collector, gc_info, m->class);
 		
-		index = KGC_getObjectIndex(collector, m->ncode);
-		if (index == KGC_ALLOC_JITCODE || index == KGC_ALLOC_TRAMPOLINE)
+		objIndex = KGC_getObjectIndex(collector, m->ncode);
+		if (objIndex == KGC_ALLOC_JITCODE 
+                    || objIndex == KGC_ALLOC_TRAMPOLINE)
 		  KGC_markObject(collector, gc_info, m->ncode);
 		
-		index = KGC_getObjectIndex(collector, m->c.bcode.code);
-		if (index == KGC_ALLOC_JITCODE || index == KGC_ALLOC_TRAMPOLINE ||
-		    index == KGC_ALLOC_BYTECODE)
+		objIndex = KGC_getObjectIndex(collector, m->c.bcode.code);
+		if (objIndex == KGC_ALLOC_JITCODE 
+                    || objIndex == KGC_ALLOC_TRAMPOLINE 
+                    || objIndex == KGC_ALLOC_BYTECODE)
 		  KGC_markObject(collector, gc_info, m->c.bcode.code);
-		
 
                 /* walk exception table in order to keep resolved catch types
                    alive */
@@ -316,14 +317,15 @@
 	    for (idx = 1; idx < len; idx++)
 	      {
 		void *method = class->itable2dtable[idx];
-		int index;
+		int objIndex;
 		
 		if (method == (void*)-1)
 		  continue;
 		
-		index = KGC_getObjectIndex(collector, method);
+		objIndex = KGC_getObjectIndex(collector, method);
 		
-		if (index == KGC_ALLOC_JITCODE || index == KGC_ALLOC_TRAMPOLINE)
+		if (objIndex == KGC_ALLOC_JITCODE 
+                    || objIndex == KGC_ALLOC_TRAMPOLINE)
 		  KGC_markObject(collector, gc_info, method);
 	      }
 	  }
@@ -347,10 +349,11 @@
 	  for (idx = 0; idx < class->msize; idx++)
 	    {
 	      void *method = class->vtable->method[idx];
-	      int index = KGC_getObjectIndex(collector, method);
+	      int objIndex = KGC_getObjectIndex(collector, method);
 
-	      if (index == KGC_ALLOC_JITCODE || index == KGC_ALLOC_TRAMPOLINE ||
-		  index == KGC_ALLOC_BYTECODE)
+	      if (objIndex == KGC_ALLOC_JITCODE 
+                  || objIndex == KGC_ALLOC_TRAMPOLINE 
+                  || objIndex == KGC_ALLOC_BYTECODE)
 		KGC_markObject(collector, gc_info, method);
 	    }
 



More information about the kaffe mailing list