[kaffe] CVS kaffe (dalibor): Fixed a few more gcc 3.3.2 -W warnings

Kaffe CVS cvs-commits at kaffe.org
Fri Jan 23 09:24:01 PST 2004


PatchSet 4364 
Date: 2004/01/23 17:17:24
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed a few more gcc 3.3.2 -W warnings

2004-01-23  Dalibor Topic <robilad at kaffe.org>

        * kaffe/kaffevm/jit3/labels.c:
        (linkLabels) Removed unused code. Fixed gcc 3.3.2
        warning.

        * kaffe/kaffevm/jit3/machine.c
        (codeblock_size): Made unsigned to fix gcc warning.
        Changed scope to static since it's not used outside
        of machine.c.
        (checkCaughtExceptions): Changed type of i to
        unsigned int to fix compiler warning. Changed type
        of parameter pc to unit32 to match declaration of
        pc to fix compiler warnings.

Members: 
	ChangeLog:1.1949->1.1950 
	kaffe/kaffevm/jit3/labels.c:1.12->1.13 
	kaffe/kaffevm/jit3/machine.c:1.46->1.47 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1949 kaffe/ChangeLog:1.1950
--- kaffe/ChangeLog:1.1949	Thu Jan 22 22:35:14 2004
+++ kaffe/ChangeLog	Fri Jan 23 17:17:24 2004
@@ -1,3 +1,18 @@
+2004-01-23  Dalibor Topic <robilad at kaffe.org>
+
+	* kaffe/kaffevm/jit3/labels.c:
+	(linkLabels) Removed unused code. Fixed gcc 3.3.2 
+	warning.
+
+	* kaffe/kaffevm/jit3/machine.c
+	(codeblock_size): Made unsigned to fix gcc warning.
+	Changed scope to static since it's not used outside
+	of machine.c.
+	(checkCaughtExceptions): Changed type of i to 
+	unsigned int to fix compiler warning. Changed type
+	of parameter pc to unit32 to match declaration of
+	pc to fix compiler warnings.
+	
 2004-01-22  Christophe Dubach <christophe.dubach at epfl.ch>
 
 	* kaffe/kaffevm/jni.c
Index: kaffe/kaffe/kaffevm/jit3/labels.c
diff -u kaffe/kaffe/kaffevm/jit3/labels.c:1.12 kaffe/kaffe/kaffevm/jit3/labels.c:1.13
--- kaffe/kaffe/kaffevm/jit3/labels.c:1.12	Sun Sep 21 18:18:19 2003
+++ kaffe/kaffe/kaffevm/jit3/labels.c	Fri Jan 23 17:17:27 2004
@@ -4,6 +4,9 @@
  * Copyright (c) 1996, 1997
  *	Transvirtual Technologies, Inc.  All rights reserved.
  *
+ * Copyright (c) 2004
+ *	Kaffe.org contributors. See ChangeLog for details.  All rights reserved.
+ *
  * See the file "license.terms" for information on usage and redistribution 
  * of this file. 
  */
@@ -161,7 +164,7 @@
 			dest = 0;
 			break;
 		default:
-			goto unhandled;
+		        return;
 		}
 
 		/*
@@ -178,7 +181,7 @@
 			dest -= codebase;
 			break;
 		default:
-			goto unhandled;
+		        return;
 		}
 
 		/* Get the insertion point. */
@@ -209,28 +212,7 @@
 		/* Machine specific labels go in this magic macro */
 			EXTRA_LABELS(place, dest, l);
 
-		unhandled:
-#if 0
-		default:
-#if defined(KAFFE_VMDEBUG)
-			kprintf("Label type 0x%x not supported (%p).\n", l->type & Ltypemask, l);
-#endif
-			ABORT();
-#endif
 		}
-#if 0
-		/*
-		 * If we were saving relocation information we must save all
-		 * labels which are 'Labsolute', that is they hold an absolute
-		 * address for something.  Note that this doesn't catch
-		 * everything, specifically it doesn't catch string objects
-		 * or references to classes.
-		 */
-		if ((l->type & Labsolute) != 0) {
-			l->snext = savedLabel;
-			savedLabel = l;
-		}
-#endif
 	}
 }
 
Index: kaffe/kaffe/kaffevm/jit3/machine.c
diff -u kaffe/kaffe/kaffevm/jit3/machine.c:1.46 kaffe/kaffe/kaffevm/jit3/machine.c:1.47
--- kaffe/kaffe/kaffevm/jit3/machine.c:1.46	Thu Jan 15 02:29:33 2004
+++ kaffe/kaffe/kaffevm/jit3/machine.c	Fri Jan 23 17:17:27 2004
@@ -94,7 +94,7 @@
 /* Codeblock redzone - allows for safe overrun when generating instructions */
 #define	CODEBLOCKREDZONE	256
 
-int codeblock_size;
+static uint codeblock_size;
 static int code_generated;
 static int bytecode_processed;
 static int codeperbytecode;
@@ -113,7 +113,7 @@
  * @param meth The method that may contain an exception handler.
  * @param pc The location within the method to look for a handler.
  */
-static void checkCaughtExceptions(Method* meth, int pc);
+static void checkCaughtExceptions(Method* meth, uint32 pc);
 
 static void initFakeCalls(void);
 static void makeFakeCalls(void);
@@ -820,9 +820,9 @@
  */
 static
 void 
-checkCaughtExceptions(Method* meth, int pc)
+checkCaughtExceptions(Method* meth, uint32 pc)
 {
-	int i;
+	unsigned int i;
 
 	willcatch.ANY = false;
 	willcatch.BADARRAYINDEX = false;




More information about the kaffe mailing list