[kaffe] Patch fixing some alpha warnings

kloeri at gentoo.org kloeri at gentoo.org
Mon Jan 10 16:09:25 PST 2005


Hi all.

Here's a small patch fixing a few warnings on alpha-linux. This patch
just fixes some seekm related warnings by changing uint32 -> size_t.
There's a lot of similar warnings on alpha which I hope to get around to
soon(ish).

Regards,
Bryan Østergaard
-------------- next part --------------
diff -burN kaffe.orig/kaffe/kaffeh/kaffeh-support.h kaffe/kaffe/kaffeh/kaffeh-support.h
--- kaffe.orig/kaffe/kaffeh/kaffeh-support.h	2005-01-10 23:44:33.000000000 +0100
+++ kaffe/kaffe/kaffeh/kaffeh-support.h	2005-01-10 22:17:27.000000000 +0100
@@ -28,10 +28,10 @@
 extern void kaffeh_findClass(const char *nm);
 
 /* support.c */
-extern bool addCode(Method* m, uint32 len, classFile* fp, errorInfo *einfo);	
-extern bool addLineNumbers(Method* m, uint32 len, classFile* fp, errorInfo *info);
-extern bool addLocalVariables(Method* m, uint32 len, classFile* fp, errorInfo *info);
-extern bool addCheckedExceptions(Method* m, uint32 len, classFile* fp, errorInfo *info);
+extern bool addCode(Method* m, size_t len, classFile* fp, errorInfo *einfo);	
+extern bool addLineNumbers(Method* m, size_t len, classFile* fp, errorInfo *info);
+extern bool addLocalVariables(Method* m, size_t len, classFile* fp, errorInfo *info);
+extern bool addCheckedExceptions(Method* m, size_t len, classFile* fp, errorInfo *info);
 
 /* sig.c */
 extern const char* translateSig(const char*, const char**, int*);
diff -burN kaffe.orig/kaffe/kaffeh/support.c kaffe/kaffe/kaffeh/support.c
--- kaffe.orig/kaffe/kaffeh/support.c	2005-01-10 23:44:33.000000000 +0100
+++ kaffe/kaffe/kaffeh/support.c	2005-01-10 22:03:32.000000000 +0100
@@ -270,7 +270,7 @@
 }
 
 bool
-addInnerClasses(Hjava_lang_Class* c UNUSED, uint32 len, classFile* fp,
+addInnerClasses(Hjava_lang_Class* c UNUSED, size_t len, classFile* fp,
 		errorInfo *einfo UNUSED)
 {
 	/* checkBufSize() done in caller. */
@@ -711,7 +711,7 @@
 }
 
 bool 
-addCode(Method* m, uint32 len, classFile* fp, errorInfo *einfo UNUSED)
+addCode(Method* m, size_t len, classFile* fp, errorInfo *einfo UNUSED)
 {
 	/* Don't try dereferencing m! */
 	assert(m == (Method*)1);
@@ -722,7 +722,7 @@
 }
 
 bool
-addLineNumbers(Method* m, uint32 len, classFile* fp, errorInfo *info UNUSED)
+addLineNumbers(Method* m, size_t len, classFile* fp, errorInfo *info UNUSED)
 {
 	/* Don't try dereferencing m! */
 	assert(m == (Method*)1);
@@ -733,7 +733,7 @@
 }
 
 bool
-addLocalVariables(Method* m, uint32 len, classFile* fp, errorInfo *info UNUSED)
+addLocalVariables(Method* m, size_t len, classFile* fp, errorInfo *info UNUSED)
 {
 	/* Don't try dereferencing m! */
 	assert(m == (Method*)1);
@@ -744,7 +744,7 @@
 }
 
 bool
-addCheckedExceptions(Method* m, uint32 len, classFile* fp,
+addCheckedExceptions(Method* m, size_t len, classFile* fp,
 		     errorInfo *info UNUSED)
 {
 	/* Don't try dereferencing m! */
diff -burN kaffe.orig/kaffe/kaffevm/classMethod.c kaffe/kaffe/kaffevm/classMethod.c
--- kaffe.orig/kaffe/kaffevm/classMethod.c	2005-01-10 23:44:34.000000000 +0100
+++ kaffe/kaffe/kaffevm/classMethod.c	2005-01-10 22:21:14.000000000 +0100
@@ -1028,7 +1028,7 @@
  * Read in InnerClasses declares for a class
  */
 bool
-addInnerClasses(Hjava_lang_Class* c, uint32 len UNUSED, classFile* fp,
+addInnerClasses(Hjava_lang_Class* c, size_t len UNUSED, classFile* fp,
 		errorInfo *einfo)
 {
 	int i;
diff -burN kaffe.orig/kaffe/kaffevm/classMethod.h kaffe/kaffe/kaffevm/classMethod.h
--- kaffe.orig/kaffe/kaffevm/classMethod.h	2005-01-10 23:44:34.000000000 +0100
+++ kaffe/kaffe/kaffevm/classMethod.h	2005-01-10 22:21:33.000000000 +0100
@@ -501,7 +501,7 @@
 Hjava_lang_Class*	setupClass(Hjava_lang_Class*, constIndex,
 				   constIndex, u2, Hjava_lang_ClassLoader*, errorInfo*);
 bool 			addSourceFile(Hjava_lang_Class* c, int idx, errorInfo*);
-bool			addInnerClasses(Hjava_lang_Class* c, uint32 len, struct classFile* fp, errorInfo *info);
+bool			addInnerClasses(Hjava_lang_Class* c, size_t len, struct classFile* fp, errorInfo *info);
 int			startMethods(Hjava_lang_Class*, u2 methct, errorInfo*);
 Method*			addMethod(Hjava_lang_Class*, u2 access_flags,
 				  u2 name_index, u2 signature_index, errorInfo*);
diff -burN kaffe.orig/kaffe/kaffevm/code.c kaffe/kaffe/kaffevm/code.c
--- kaffe.orig/kaffe/kaffevm/code.c	2005-01-10 23:44:34.000000000 +0100
+++ kaffe/kaffe/kaffevm/code.c	2005-01-10 22:35:38.000000000 +0100
@@ -25,7 +25,7 @@
 #include "exception.h"
 
 bool
-addCode(Method* m, uint32 len UNUSED, classFile* fp, errorInfo *einfo)
+addCode(Method* m, size_t len UNUSED, classFile* fp, errorInfo *einfo)
 {
 	bool retval = false;
 	Code c;
@@ -127,7 +127,7 @@
  * Read in line numbers assocated with code.
  */
 bool
-addLineNumbers(Method* m, uint32 len UNUSED, classFile* fp, errorInfo *info)
+addLineNumbers(Method* m, size_t len UNUSED, classFile* fp, errorInfo *info)
 {
 	lineNumbers* lines;
 	int i;
@@ -170,7 +170,7 @@
 }
 
 bool
-addLocalVariables(Method *m, uint32 len UNUSED, classFile *fp, errorInfo *info)
+addLocalVariables(Method *m, size_t len UNUSED, classFile *fp, errorInfo *info)
 {
 	constants *pool = CLASS_CONSTANTS(m->class);
 	localVariables *lv;
@@ -239,7 +239,7 @@
  * Read in (checked) exceptions declared for a method
  */
 bool
-addCheckedExceptions(Method* m, uint32 len UNUSED, classFile* fp,
+addCheckedExceptions(Method* m, size_t len UNUSED, classFile* fp,
 		     errorInfo *info)
 {
 	int i;
diff -burN kaffe.orig/kaffe/kaffevm/code.h kaffe/kaffe/kaffevm/code.h
--- kaffe.orig/kaffe/kaffevm/code.h	2005-01-10 23:44:34.000000000 +0100
+++ kaffe/kaffe/kaffevm/code.h	2005-01-10 22:05:55.000000000 +0100
@@ -52,13 +52,13 @@
 struct _methods;
 struct classFile;
 
-bool	addCode(struct _methods*, uint32, struct classFile*,
+bool	addCode(struct _methods*, size_t, struct classFile*,
 		errorInfo *info);
-bool	addLineNumbers(struct _methods*, uint32, struct classFile*,
+bool	addLineNumbers(struct _methods*, size_t, struct classFile*,
 		       errorInfo *info);
-bool	addLocalVariables(struct _methods*, uint32, struct classFile *,
+bool	addLocalVariables(struct _methods*, size_t, struct classFile *,
 			  errorInfo *info);
-bool	addCheckedExceptions(struct _methods*, uint32,
+bool	addCheckedExceptions(struct _methods*, size_t,
 			     struct classFile*, errorInfo *info);
 
 #endif


More information about the kaffe mailing list