[kaffe] CVS kaffe (robilad): fixed a few gcc 4.1 warnings for jit engine

Kaffe CVS cvs-commits at kaffe.org
Sun Dec 23 14:39:12 PST 2007


PatchSet 7618 
Date: 2007/12/23 22:38:08
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
fixed a few gcc 4.1 warnings for jit engine

2007-12-23  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/jit/machine.c (finishInsnSequence):
        Removed superflous cast of jch->code_start to char *,
        cast jch->pool to nativecode * instead of char * to fix
        compiler warning.
        (installMethodCode): Changed cast of code->code to
        nativecode * to match meth->c.ncode.ncode_end and fix a
        compiler warning.

        * kaffe/kaffevm/jit/codeproto.h,
        kaffe/kaffevm/jit/icode.c (softcall_lookupinterfacemethod):
        Added const to method parameter for fix compiler warning.

Members: 
	ChangeLog:1.5116->1.5117 
	kaffe/kaffevm/jit/codeproto.h:1.7->1.8 
	kaffe/kaffevm/jit/icode.c:1.38->1.39 
	kaffe/kaffevm/jit/machine.c:1.90->1.91 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5116 kaffe/ChangeLog:1.5117
--- kaffe/ChangeLog:1.5116	Sat Dec 22 23:26:24 2007
+++ kaffe/ChangeLog	Sun Dec 23 22:38:08 2007
@@ -1,3 +1,17 @@
+2007-12-23  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffevm/jit/machine.c (finishInsnSequence): 
+	Removed superflous cast of jch->code_start to char *,
+	cast jch->pool to nativecode * instead of char * to fix
+	compiler warning.
+	(installMethodCode): Changed cast of code->code to 
+	nativecode * to match meth->c.ncode.ncode_end and fix a
+	compiler warning.
+
+	* kaffe/kaffevm/jit/codeproto.h,
+	kaffe/kaffevm/jit/icode.c (softcall_lookupinterfacemethod): 
+	Added const to method parameter for fix compiler warning.
+
 2007-12-22  Dalibor Topic  <robilad at kaffe.org>
 
 	* TODO: Changed gjdoc integration task to reflect status.
Index: kaffe/kaffe/kaffevm/jit/codeproto.h
diff -u kaffe/kaffe/kaffevm/jit/codeproto.h:1.7 kaffe/kaffe/kaffevm/jit/codeproto.h:1.8
--- kaffe/kaffe/kaffevm/jit/codeproto.h:1.7	Sat Aug  6 00:41:43 2005
+++ kaffe/kaffe/kaffevm/jit/codeproto.h	Sun Dec 23 22:38:10 2007
@@ -228,7 +228,7 @@
 void check_array_constindex(SlotInfo*, jint);
 
 
-void softcall_lookupinterfacemethod(SlotInfo*, Method*, SlotInfo*);
+void softcall_lookupinterfacemethod(SlotInfo*, const Method*, SlotInfo*);
 void softcall_nullpointer(void);
 void softcall_new(SlotInfo*, struct Hjava_lang_Class*);
 void softcall_newarray(SlotInfo*, SlotInfo*, int);
Index: kaffe/kaffe/kaffevm/jit/icode.c
diff -u kaffe/kaffe/kaffevm/jit/icode.c:1.38 kaffe/kaffe/kaffevm/jit/icode.c:1.39
--- kaffe/kaffe/kaffevm/jit/icode.c:1.38	Sat Aug 20 19:20:33 2005
+++ kaffe/kaffe/kaffevm/jit/icode.c	Sun Dec 23 22:38:10 2007
@@ -3385,7 +3385,7 @@
 /*									   */
 
 void
-softcall_lookupinterfacemethod(SlotInfo* dst, Method* meth, SlotInfo* obj)
+softcall_lookupinterfacemethod(SlotInfo* dst, const Method* meth, SlotInfo* obj)
 {
 	/* 'obj' must be written back since it will be reused */
 	prepare_function_call();
Index: kaffe/kaffe/kaffevm/jit/machine.c
diff -u kaffe/kaffe/kaffevm/jit/machine.c:1.90 kaffe/kaffe/kaffevm/jit/machine.c:1.91
--- kaffe/kaffe/kaffevm/jit/machine.c:1.90	Sun Dec  9 03:02:33 2007
+++ kaffe/kaffe/kaffevm/jit/machine.c	Sun Dec 23 22:38:10 2007
@@ -506,7 +506,7 @@
 	jch = (jitCodeHeader *)methblock;
 	jch->pool = (void *)((char *)(jch + 1)) + exc_len;
 	jch->pool = (void *)(((uintp)jch->pool + const_align) & ~const_align );
-	jch->code_start = ((char *)jch->pool) + constlen;
+	jch->code_start = ((nativecode *)jch->pool) + constlen;
 	jch->code_len = CODEPC;
 	/* align entry point if so desired */
 	if (align != 0 && (unsigned long)jch->code_start % align != 0) {
@@ -514,7 +514,7 @@
 		
 		assert(pad <= align - ALIGNMENT_OF_SIZE(sizeof(jdouble)));
 		
-		jch->code_start = (char*)jch->code_start + pad;
+		jch->code_start = jch->code_start + pad;
 	}
 	memcpy(jch->code_start, codeblock, CODEPC);
 	addToCounter(&jitcodeblock, "jitmem-codeblock", 1,
@@ -576,7 +576,7 @@
 	SET_METHOD_JITCODE(meth, code->code);
 
 	setMethodCodeStart(meth, code->mem);
-	meth->c.ncode.ncode_end = (char*)code->code + code->codelen;
+	meth->c.ncode.ncode_end = (nativecode *)code->code + code->codelen;
 
 	jch = (jitCodeHeader *)code->mem;
 	jch->method = meth;




More information about the kaffe mailing list