[kaffe] CVS kaffe (robilad): Warning fixes for jit

Kaffe CVS cvs-commits at kaffe.org
Sat Aug 20 12:25:27 PDT 2005


PatchSet 6853 
Date: 2005/08/20 19:20:33
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Warning fixes for jit

2005-08-20  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/jit/basecode.c,
        kaffe/kaffevm/jit/icode.c,
        kaffe/kaffevm/jit/machine.c,
        kaffe/kaffevm/jit/registers.c:
        Labelled unused parameters as UNUSED, added missing headers and
        made variables unsigned where necessary to fix compiler warnings.

Members: 
	kaffe/kaffevm/jit/basecode.c:1.6->1.7 
	kaffe/kaffevm/jit/icode.c:1.37->1.38 
	kaffe/kaffevm/jit/machine.c:1.82->1.83 
	kaffe/kaffevm/jit/registers.c:1.10->1.11 

Index: kaffe/kaffe/kaffevm/jit/basecode.c
diff -u kaffe/kaffe/kaffevm/jit/basecode.c:1.6 kaffe/kaffe/kaffevm/jit/basecode.c:1.7
--- kaffe/kaffe/kaffevm/jit/basecode.c:1.6	Fri May  6 15:24:29 2005
+++ kaffe/kaffe/kaffevm/jit/basecode.c	Sat Aug 20 19:20:33 2005
@@ -24,7 +24,7 @@
 				if ((S) != 0) (S)->info = SI_SLOT
 
 void
-_slot_const_const(SlotInfo* dst, jword s1, jword s2, ifunc f, int type)
+_slot_const_const(SlotInfo* dst, jword s1, jword s2, ifunc f, int type UNUSED)
 {
 	sequence* seq = nextSeq();
 
@@ -60,7 +60,7 @@
 }
 
 void
-_slot_slot_fconst(SlotInfo* dst, SlotInfo* s1, double s2, ifunc f, int type)
+_slot_slot_fconst(SlotInfo* dst, SlotInfo* s1, double s2, ifunc f, int type UNUSED)
 {
 	sequence* seq = nextSeq();
 
@@ -114,7 +114,7 @@
 }
 
 void
-_lslot_lslot_lslot(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2, ifunc f, int type)
+_lslot_lslot_lslot(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2, ifunc f, int type UNUSED)
 {
 	sequence* seq;
 #if defined(TWO_OPERAND)
@@ -149,7 +149,7 @@
 }
 
 void
-_lslot_lslot_slot(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2, ifunc f, int type)
+_lslot_lslot_slot(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2, ifunc f, int type UNUSED)
 {
 	sequence* seq;
 #if defined(TWO_OPERAND)
@@ -184,7 +184,7 @@
 }
 
 void
-_slot_slot_lslot(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2, ifunc f, int type)
+_slot_slot_lslot(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2, ifunc f, int type UNUSED)
 {
 	sequence* seq;
 #if defined(TWO_OPERAND)
@@ -219,7 +219,7 @@
 }
 
 void
-_slot_lslot_lslot(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2, ifunc f, int type)
+_slot_lslot_lslot(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2, ifunc f, int type UNUSED)
 {
 	sequence* seq;
 
@@ -237,7 +237,7 @@
 }
 
 void
-_lslot_lslot_const(SlotInfo* dst, SlotInfo* s1, jword s2, ifunc f, int type)
+_lslot_lslot_const(SlotInfo* dst, SlotInfo* s1, jword s2, ifunc f, int type UNUSED)
 {
 	sequence* seq = nextSeq();
 
@@ -249,7 +249,7 @@
 }
 
 void
-_lslot_lslot_lconst(SlotInfo* dst, SlotInfo* s1, jlong s2, ifunc f, int type)
+_lslot_lslot_lconst(SlotInfo* dst, SlotInfo* s1, jlong s2, ifunc f, int type UNUSED)
 {
 	sequence* seq = nextSeq();
 
@@ -261,7 +261,7 @@
 }
 
 void
-_lslot_slot_lconst(SlotInfo* dst, SlotInfo* s1, jlong s2, ifunc f, int type)
+_lslot_slot_lconst(SlotInfo* dst, SlotInfo* s1, jlong s2, ifunc f, int type UNUSED)
 {
 	sequence* seq = nextSeq();
 
@@ -273,7 +273,7 @@
 }
 
 void
-_lslot_slot_fconst(SlotInfo* dst, SlotInfo* s1, double s2, ifunc f, int type)
+_lslot_slot_fconst(SlotInfo* dst, SlotInfo* s1, double s2, ifunc f, int type UNUSED)
 {
 	sequence* seq = nextSeq();
 
@@ -287,7 +287,7 @@
 void
 _slot_slot_slot_const_const(SlotInfo* dst, SlotInfo* s1, SlotInfo* s2,
 			    jword s3, jword s4, ifunc f,
-			    int type)
+			    int type UNUSED)
 {
 	sequence* seq = nextSeq();
 
@@ -303,7 +303,7 @@
 void
 _slot_slot_const_const_const(SlotInfo* dst, SlotInfo* s1, jword s2,
 			     jword s3, jword s4, ifunc f,
-			     int type)
+			     int type UNUSED)
 {
 	sequence* seq = nextSeq();
 
Index: kaffe/kaffe/kaffevm/jit/icode.c
diff -u kaffe/kaffe/kaffevm/jit/icode.c:1.37 kaffe/kaffe/kaffevm/jit/icode.c:1.38
--- kaffe/kaffe/kaffevm/jit/icode.c:1.37	Fri Aug  5 22:50:32 2005
+++ kaffe/kaffe/kaffevm/jit/icode.c	Sat Aug 20 19:20:33 2005
@@ -2735,7 +2735,7 @@
 /*									   */
 
 label*
-reference_label(int32 i, int32 n)
+reference_label(int32 i UNUSED, int32 n)
 {
 	label* l;
 
@@ -2801,7 +2801,7 @@
 
 #if defined(HAVE_set_label)
 void
-set_label(int i, int n)
+set_label(int i UNUSED, int n)
 {
 	assert(n < MAXLABTAB);
 	if (labtab[n] == 0) {
Index: kaffe/kaffe/kaffevm/jit/machine.c
diff -u kaffe/kaffe/kaffevm/jit/machine.c:1.82 kaffe/kaffe/kaffevm/jit/machine.c:1.83
--- kaffe/kaffe/kaffevm/jit/machine.c:1.82	Sat Aug 20 14:20:59 2005
+++ kaffe/kaffe/kaffevm/jit/machine.c	Sat Aug 20 19:20:33 2005
@@ -125,7 +125,7 @@
 } jitStats;
 
 static void generateInsnSequence(codeinfo* codeInfo);
-static void checkCaughtExceptions(Method* meth, int pc);
+static void checkCaughtExceptions(Method* meth, unsigned int pc);
 
 void	endBlock(sequence*);
 void	startBlock(sequence*);
@@ -191,7 +191,7 @@
 	SlotInfo* mtable;
 
 	bytecode* base;
-	int len;
+	unsigned int len;
 	callInfo cinfo;
 	fieldInfo finfo;
 	Hjava_lang_Class* crinfo;
@@ -452,9 +452,9 @@
 finishInsnSequence(codeinfo* codeInfo, nativeCodeInfo* code, errorInfo *einfo)
 {
 #if defined(CALLTARGET_ALIGNMENT)
-	int align = CALLTARGET_ALIGNMENT;
+	unsigned int align = CALLTARGET_ALIGNMENT;
 #else
-	int align = 0;
+	unsigned int align = 0;
 #endif
 #if defined(MD_JIT_EXCEPTION_INFO_LENGTH)
 	int exc_len = MD_JIT_EXCEPTION_INFO_LENGTH;
@@ -486,7 +486,7 @@
 	jch->code_len = CODEPC;
 	/* align entry point if so desired */
 	if (align != 0 && (unsigned long)jch->code_start % align != 0) {
-		int pad = (align - (unsigned long)jch->code_start % align);
+		unsigned int pad = (align - (unsigned long)jch->code_start % align);
 		
 		assert(pad <= align - ALIGNMENT_OF_SIZE(sizeof(jdouble)));
 		
@@ -536,7 +536,7 @@
 void
 installMethodCode(codeinfo* codeInfo, Method* meth, nativeCodeInfo* code)
 {
-	int i;
+	unsigned int i;
 	jexceptionEntry* e;
 	jitCodeHeader *jch;
 	void *tramp;
@@ -702,7 +702,7 @@
  * Start a new basic sub-block.
  */
 void
-startSubBlock(sequence* s)
+startSubBlock(sequence* s UNUSED)
 {
 	int i;
 
@@ -721,7 +721,7 @@
  * Fixup after a function call.
  */
 void
-fixupFunctionCall(sequence* s)
+fixupFunctionCall(sequence* s UNUSED)
 {
 	int i;
 
@@ -892,9 +892,9 @@
  */
 static
 void 
-checkCaughtExceptions(Method* meth, int pc)
+checkCaughtExceptions(Method* meth, unsigned int pc)
 {
-	int i;
+	unsigned int i;
 
 	willcatch.BADARRAYINDEX = false;
 	willcatch.NULLPOINTER = false;
@@ -947,7 +947,7 @@
 static FILE *prof_output;
 
 static int
-profilerClassStat(Hjava_lang_Class *clazz, void *param)
+profilerClassStat(Hjava_lang_Class *clazz, void *param UNUSED)
 {
 	Method *meth;
 	int mindex;
Index: kaffe/kaffe/kaffevm/jit/registers.c
diff -u kaffe/kaffe/kaffevm/jit/registers.c:1.10 kaffe/kaffe/kaffevm/jit/registers.c:1.11
--- kaffe/kaffe/kaffevm/jit/registers.c:1.10	Fri May  6 15:24:29 2005
+++ kaffe/kaffe/kaffevm/jit/registers.c	Sat Aug 20 19:20:33 2005
@@ -13,9 +13,9 @@
 #include "gtypes.h"
 #include "bytecode.h"
 #include "slots.h"
+#include "icode.h"
 #include "registers.h"
 #include "seq.h"
-#include "icode.h"
 #include "labels.h"
 #include "codeproto.h"
 #include "errors.h"
@@ -386,7 +386,7 @@
  * the slot is in a register, it is spilled.
  */
 int
-slowSlotOffset(SlotInfo* slot, int type, int use)
+slowSlotOffset(SlotInfo* slot, int type, int use UNUSED)
 {
 	/* If slot is in a register, clobber the register to force it back
 	 * into memory.




More information about the kaffe mailing list