[kaffe] CVS kaffe (robilad): Fixed 210 warnings on ppc-linux-intrp

Kaffe CVS cvs-commits at kaffe.org
Sun Feb 6 17:32:48 PST 2005


PatchSet 5493 
Date: 2005/02/07 01:27:56
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Fixed 210 warnings on ppc-linux-intrp

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

        * kaffe/kaffevm/exception.c (vmExcept_isJNIFrame,
        vmExcept_setSyncObj, vmExcept_getSyncObj, vmExcept_setPC,
        vmExcept_getPC): Clarified asserts.
        (vmExcept_JNIContains, vmExcept_setJNIFrame) Use
        JNIFrameAddress type.

        * kaffe/kaffevm/exception.h (JNIFrameAddress): New type.
        (VmExceptHandler, vmExcept_setJNIFrame) Use JNIFrameAddress.

        That fixes 210 warnings on powerpc-linux-intrp.

Members: 
	ChangeLog:1.3538->1.3539 
	kaffe/kaffevm/exception.c:1.92->1.93 
	kaffe/kaffevm/exception.h:1.31->1.32 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3538 kaffe/ChangeLog:1.3539
--- kaffe/ChangeLog:1.3538	Sun Feb  6 23:29:17 2005
+++ kaffe/ChangeLog	Mon Feb  7 01:27:56 2005
@@ -1,3 +1,16 @@
+2005-02-07  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffevm/exception.c (vmExcept_isJNIFrame,
+	vmExcept_setSyncObj, vmExcept_getSyncObj, vmExcept_setPC,
+	vmExcept_getPC): Clarified asserts.
+	(vmExcept_JNIContains, vmExcept_setJNIFrame) Use
+	JNIFrameAddress type.
+
+	* kaffe/kaffevm/exception.h (JNIFrameAddress): New type.
+	(VmExceptHandler, vmExcept_setJNIFrame) Use JNIFrameAddress. 
+
+	That fixes 210 warnings on powerpc-linux-intrp.
+
 2005-02-06  Dalibor Topic  <robilad at kaffe.org>
 
 	* kaffe/kaffevm/exception.c (vmExcept_isJNIFrame,
Index: kaffe/kaffe/kaffevm/exception.c
diff -u kaffe/kaffe/kaffevm/exception.c:1.92 kaffe/kaffe/kaffevm/exception.c:1.93
--- kaffe/kaffe/kaffevm/exception.c:1.92	Sun Feb  6 23:29:20 2005
+++ kaffe/kaffe/kaffevm/exception.c	Mon Feb  7 01:27:59 2005
@@ -76,25 +76,25 @@
 bool
 vmExcept_isJNIFrame(VmExceptHandler* eh)
 {
-	assert(eh);
+	assert(eh != NULL);
 	return (eh->meth == VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
 }
 
 static bool
-vmExcept_JNIContains(VmExceptHandler* eh, uintp fp)
+vmExcept_JNIContains(VmExceptHandler* eh, JNIFrameAddress fp)
 {
-	assert(eh);
+	assert(eh != NULL);
 	assert(eh->meth == VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
-	assert(fp);
+	assert(fp != NULL);
 
 	return (eh->frame.jni.fp == fp);
 }
 
 void 
-vmExcept_setJNIFrame(VmExceptHandler* eh, uintp fp)
+vmExcept_setJNIFrame(VmExceptHandler* eh, JNIFrameAddress fp)
 {
-	assert(eh);
-	assert(fp != 0);
+	assert(eh != NULL);
+	assert(fp != NULL);
 
 	eh->meth = VMEXCEPTHANDLER_KAFFEJNI_HANDLER;
 	eh->frame.jni.fp = fp;
@@ -109,8 +109,8 @@
 void 
 vmExcept_setSyncObj(VmExceptHandler* eh, struct Hjava_lang_Object* syncobj)
 {
-	assert(eh);
-	assert(eh->meth != 0);
+	assert(eh != NULL);
+	assert(eh->meth != NULL);
 	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
 	eh->frame.intrp.syncobj = syncobj;
 }
@@ -118,8 +118,8 @@
 static struct Hjava_lang_Object*
 vmExcept_getSyncObj(VmExceptHandler* eh)
 {
-	assert(eh);
-	assert(eh->meth != 0);
+	assert(eh != NULL);
+	assert(eh->meth != NULL);
 	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
 	return eh->frame.intrp.syncobj;
 }
@@ -127,8 +127,8 @@
 void 
 vmExcept_setPC(volatile VmExceptHandler* eh, u4 pc)
 {
-	assert(eh);
-	assert(eh->meth != 0);
+	assert(eh != NULL);
+	assert(eh->meth != NULL);
 	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
 	eh->frame.intrp.pc = pc;
 }
@@ -136,8 +136,8 @@
 u4 
 vmExcept_getPC(const VmExceptHandler* eh)
 {
-	assert(eh);
-	assert(eh->meth != 0);
+	assert(eh != NULL);
+	assert(eh->meth != NULL);
 	assert(eh->meth != VMEXCEPTHANDLER_KAFFEJNI_HANDLER);
 	return eh->frame.intrp.pc;
 }
Index: kaffe/kaffe/kaffevm/exception.h
diff -u kaffe/kaffe/kaffevm/exception.h:1.31 kaffe/kaffe/kaffevm/exception.h:1.32
--- kaffe/kaffe/kaffevm/exception.h:1.31	Sun Feb  6 23:29:21 2005
+++ kaffe/kaffe/kaffevm/exception.h	Mon Feb  7 01:27:59 2005
@@ -53,6 +53,12 @@
 	jexceptionEntry			entry[1];
 } jexception;
 
+#if defined(TRANSLATOR)
+typedef uintp                   JNIFrameAddress;
+#else
+typedef struct VmExceptHandler* JNIFrameAddress;
+#endif
+
 /*
  * A VmExceptHandle is used to handle *any* exception in native code
  * in the core of the VM.  Set up when entering Kaffe_JNI methods, or
@@ -79,7 +85,7 @@
 		struct
 		{
 			/* Frame address for JNI entry function. */
-			uintp	        		fp;
+			JNIFrameAddress	        		fp;
 		} jni;
 		/*
 		 * The intrp bits are only valid if meth != 0 && meth
@@ -106,7 +112,7 @@
 extern void initExceptions(void);
 
 bool vmExcept_isJNIFrame(VmExceptHandler* eh);
-void vmExcept_setJNIFrame(VmExceptHandler* eh, uintp fp);
+void vmExcept_setJNIFrame(VmExceptHandler* eh, JNIFrameAddress fp);
 void vmExcept_setSyncObj(VmExceptHandler* eh, struct Hjava_lang_Object* syncobj);
 void vmExcept_setPC(volatile VmExceptHandler* eh, u4 pc);
 u4 vmExcept_getPC(const VmExceptHandler* eh);




More information about the kaffe mailing list