[kaffe] CVS kaffe (doogie): Fix several warnings.

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Mon Apr 5 11:01:04 2004


PatchSet 4624 
Date: 2004/04/05 17:43:34
Author: doogie
Branch: HEAD
Tag: (none) 
Log:
Fix several warnings.

Members: 
	ChangeLog:1.2201->1.2202 
	kaffe/kaffevm/classMethod.c:1.117->1.118 
	kaffe/kaffevm/exception.c:1.81->1.82 
	kaffe/kaffevm/jni.c:1.108->1.109 
	kaffe/kaffevm/soft.c:1.59->1.60 
	kaffe/kaffevm/support.c:1.63->1.64 
	kaffe/kaffevm/support.h:1.30->1.31 
	kaffe/kaffevm/verify.c:1.72->1.73 
	kaffe/kaffevm/intrp/machine.c:1.41->1.42 
	kaffe/kaffevm/jit/machine.c:1.62->1.63 
	kaffe/kaffevm/jit3/machine.c:1.49->1.50 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2201 kaffe/ChangeLog:1.2202
--- kaffe/ChangeLog:1.2201	Mon Apr  5 16:28:07 2004
+++ kaffe/ChangeLog	Mon Apr  5 17:43:34 2004
@@ -1,3 +1,9 @@
+2004-04-05  Nektarios K. Papadopoulos <npapadop@inaccessnetworks.com>
+
+	* kaffe/kaffevm/{classMethod,exception,jni,soft,stackTrace,
+	  support,verify,{intrp,jit,jit3}/machine}.c,
+	  kaffe/kaffevm/support.h: Fix several warnings.
+
 2004-04-05  Dalibor Topic <robilad@kaffe.org>
 
         * Makefile.in,
Index: kaffe/kaffe/kaffevm/classMethod.c
diff -u kaffe/kaffe/kaffevm/classMethod.c:1.117 kaffe/kaffe/kaffevm/classMethod.c:1.118
--- kaffe/kaffe/kaffevm/classMethod.c:1.117	Fri Apr  2 21:27:44 2004
+++ kaffe/kaffe/kaffevm/classMethod.c	Mon Apr  5 17:43:38 2004
@@ -1659,7 +1659,7 @@
 	int fsize;
 	int align;
 	Field* fld;
-	int nbits, n;
+	int nbits, nifields;
 	int offset;
 	int maxalign;
 	int oldoffset;
@@ -1677,8 +1677,8 @@
 	/* Find the largest alignment in this class */
 	maxalign = 1;
 	fld = CLASS_IFIELDS(class);
-	n = CLASS_NIFIELDS(class);
-	for (; --n >= 0; fld++) {
+	nifields = CLASS_NIFIELDS(class);
+	for (; --nifields >= 0; fld++) {
 		fsize = FIELD_SIZE(fld);
 		/* Work out alignment for this size entity */
 		fsize = ALIGNMENT_OF_SIZE(fsize);
@@ -1698,8 +1698,8 @@
 
 	/* Now work out where to put each field */
 	fld = CLASS_IFIELDS(class);
-	n = CLASS_NIFIELDS(class);
-	for (; --n >= 0; fld++) {
+	nifields = CLASS_NIFIELDS(class);
+	for (; --nifields >= 0; fld++) {
 		fsize = FIELD_SIZE(fld);
 		/* Align field */
 		align = ALIGNMENT_OF_SIZE(fsize);
@@ -1750,8 +1750,8 @@
 
 	/* Now work out the gc layout */
 	fld = CLASS_IFIELDS(class);
-	n = CLASS_NIFIELDS(class);
-	for (; --n >= 0; fld++) {
+	nifields = CLASS_NIFIELDS(class);
+	for (; --nifields >= 0; fld++) {
 		fsize = FIELD_SIZE(fld);
 		/* Align field */
 		align = ALIGNMENT_OF_SIZE(fsize);
Index: kaffe/kaffe/kaffevm/exception.c
diff -u kaffe/kaffe/kaffevm/exception.c:1.81 kaffe/kaffe/kaffevm/exception.c:1.82
--- kaffe/kaffe/kaffevm/exception.c:1.81	Fri Apr  2 21:27:44 2004
+++ kaffe/kaffe/kaffevm/exception.c	Mon Apr  5 17:43:38 2004
@@ -70,8 +70,6 @@
 static void floatingException(struct _exceptionFrame *) NONRETURNING;
 static void dispatchException(Hjava_lang_Throwable*, stackTraceInfo*) NONRETURNING;
 
-extern void printStackTrace(struct Hjava_lang_Throwable*, struct Hjava_lang_Object*, int);
-
 static bool findExceptionBlockInMethod(uintp, Hjava_lang_Class*, Method*, uintp*);
 
 /*
@@ -348,7 +346,7 @@
 		/*
 		 * if we reach the last jni frame, we're done
 		 */
-		if (lastJniFrame && vmExcept_JNIContains(lastJniFrame, frame->fp)) {
+		if (lastJniFrame && vmExcept_JNIContains(lastJniFrame, (void*)frame->fp)) {
 			thread_data->exceptPtr = lastJniFrame;
 			vmExcept_jumpToHandler(lastJniFrame); /* doesn't return */
 		}
Index: kaffe/kaffe/kaffevm/jni.c
diff -u kaffe/kaffe/kaffevm/jni.c:1.108 kaffe/kaffe/kaffevm/jni.c:1.109
--- kaffe/kaffe/kaffevm/jni.c:1.108	Sun Apr  4 04:15:37 2004
+++ kaffe/kaffe/kaffevm/jni.c	Mon Apr  5 17:43:38 2004
@@ -4456,6 +4456,7 @@
 	Kaffe_AttachCurrentThread,
 	Kaffe_DetachCurrentThread,
 	Kaffe_GetEnv,
+	NULL
 };
 
 /*
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.59 kaffe/kaffe/kaffevm/soft.c:1.60
--- kaffe/kaffe/kaffevm/soft.c:1.59	Sat Apr  3 00:06:10 2004
+++ kaffe/kaffe/kaffevm/soft.c	Mon Apr  5 17:43:38 2004
@@ -792,6 +792,7 @@
 	return (ret);
 }
 
+#if defined(TRANSLATOR)
 jlong
 soft_lmul(jlong v1, jlong v2)
 {
@@ -914,6 +915,7 @@
 		return (0);
 	}
 }
+#endif
 
 jint
 soft_mul(jint v1, jint v2)
Index: kaffe/kaffe/kaffevm/support.c
diff -u kaffe/kaffe/kaffevm/support.c:1.63 kaffe/kaffe/kaffevm/support.c:1.64
--- kaffe/kaffe/kaffevm/support.c:1.63	Wed Mar 24 22:54:51 2004
+++ kaffe/kaffe/kaffevm/support.c	Mon Apr  5 17:43:38 2004
@@ -1024,7 +1024,7 @@
  * @param value the value of the property to be set
  */
 void
-setProperty(void* properties, char* key, char* value)
+setProperty(void* properties, const char* key, const char* value)
 {
 	Hjava_lang_String* jkey;
 	Hjava_lang_String* jvalue;
Index: kaffe/kaffe/kaffevm/support.h
diff -u kaffe/kaffe/kaffevm/support.h:1.30 kaffe/kaffe/kaffevm/support.h:1.31
--- kaffe/kaffe/kaffevm/support.h:1.30	Mon Mar 29 21:39:14 2004
+++ kaffe/kaffe/kaffevm/support.h	Mon Apr  5 17:43:39 2004
@@ -107,9 +107,8 @@
 struct Hjava_lang_Throwable;
 struct Hjava_lang_ClassLoader;
 
-extern void		setProperty(void*, char*, char*);
-extern char*		getEngine(void);
-extern void		pathname2classname(const char*, char*);
+extern void		setProperty(void*, const char*, const char*);
+extern const char*		getEngine(void);
 extern jvalue		do_execute_java_method(void*, const char*, const char*, struct _methods*, int, ...);
 extern jvalue		do_execute_java_method_v(void*, const char*, const char*, struct _methods*, int, va_list);
 extern jvalue		do_execute_java_class_method(const char*, struct Hjava_lang_ClassLoader*, const char*, const char*, ...);
@@ -132,6 +131,9 @@
 extern int addClasspath(const char*);
 extern int prependClasspath(const char*);
 
+void replacechar(const char* from, char* to, char old, char new);
+void classname2pathname(const char* from, char* to);
+void pathname2classname(const char* from, char* to);
 int bitCount(int bits);
 
 /*
Index: kaffe/kaffe/kaffevm/verify.c
diff -u kaffe/kaffe/kaffevm/verify.c:1.72 kaffe/kaffe/kaffevm/verify.c:1.73
--- kaffe/kaffe/kaffevm/verify.c:1.72	Mon Mar  8 21:21:10 2004
+++ kaffe/kaffe/kaffevm/verify.c	Mon Apr  5 17:43:38 2004
@@ -3382,13 +3382,13 @@
 				UninitializedType* uninit = receiver->data.uninit;
 				
 				if (receiver->tinfo == TINFO_UNINIT_SUPER) {
-					Type t;
-					t.tinfo = TINFO_CLASS;
-					t.data.class = uninit->type.data.class->superclass;
+					Type t_uninit_super;
+					t_uninit_super.tinfo = TINFO_CLASS;
+					t_uninit_super.data.class = uninit->type.data.class->superclass;
 					
 					if (!sameType(methodRefClass, &uninit->type) &&
 					    uninit->type.data.class != TOBJ->data.class &&
-					    !sameType(methodRefClass, &t)) {
+					    !sameType(methodRefClass, &t_uninit_super)) {
 						return verifyErrorInCheckMethodCall(einfo, method, argbuf, pc, idx, pool, methSig, "incompatible receiving type for superclass constructor call");
 					}
 				} else if (!sameType(methodRefClass, &uninit->type)) {
Index: kaffe/kaffe/kaffevm/intrp/machine.c
diff -u kaffe/kaffe/kaffevm/intrp/machine.c:1.41 kaffe/kaffe/kaffevm/intrp/machine.c:1.42
--- kaffe/kaffe/kaffevm/intrp/machine.c:1.41	Tue Feb 10 17:16:39 2004
+++ kaffe/kaffe/kaffevm/intrp/machine.c	Mon Apr  5 17:43:39 2004
@@ -117,10 +117,10 @@
 	
 		{
 			Hjava_lang_Throwable *th;
-			errorInfo einfo;
+			errorInfo soeinfo;
 
 			thread_data->needOnStack = STACK_LOW;
-			th = (Hjava_lang_Throwable *)newObjectChecked (javaLangStackOverflowError, &einfo);
+			th = (Hjava_lang_Throwable *)newObjectChecked (javaLangStackOverflowError, &soeinfo);
 			thread_data->needOnStack = STACK_HIGH;
 		
 			throwException(th);
@@ -281,7 +281,7 @@
 /*
  * say what engine we're using
  */
-char*
+const char*
 getEngine()
 {
 	return "kaffe.intr";
Index: kaffe/kaffe/kaffevm/jit/machine.c
diff -u kaffe/kaffe/kaffevm/jit/machine.c:1.62 kaffe/kaffe/kaffevm/jit/machine.c:1.63
--- kaffe/kaffe/kaffevm/jit/machine.c:1.62	Tue Mar  9 15:15:35 2004
+++ kaffe/kaffe/kaffevm/jit/machine.c	Mon Apr  5 17:43:41 2004
@@ -904,7 +904,7 @@
 /*
  * return what engine we're using
  */
-char* 
+const char* 
 getEngine(void)
 {
 	return "kaffe.jit";
Index: kaffe/kaffe/kaffevm/jit3/machine.c
diff -u kaffe/kaffe/kaffevm/jit3/machine.c:1.49 kaffe/kaffe/kaffevm/jit3/machine.c:1.50
--- kaffe/kaffe/kaffevm/jit3/machine.c:1.49	Fri Apr  2 21:27:47 2004
+++ kaffe/kaffe/kaffevm/jit3/machine.c	Mon Apr  5 17:43:41 2004
@@ -1472,7 +1472,7 @@
 /*
  * return what engine we're using
  */
-char*
+const char*
 getEngine(void)
 {
 	return "kaffe.jit";