Hi

I am relatively new to kaffe.

I am evaluating the possibility to use kaffe as the java execution
environment for our embedded system [1] in order to run an OSGi framework on top [2].


Wishing to participate in the 'warning hunt', I tracked down some warnings. (cvs diff -u attached)

But I am not sure about how to be positive that I am not breaking anything.

For the moment I just do `make check` on my current configuration [3].
Only 'BeanBug' fails which is normal since I don't have awt


BTW scripts/sort-warnings.pl warning count: before: Total Errors: 1493 after : Total Errors: 1388

P.S. Sorry for not providing a ChangeLog entry as requested, but I am not sure in what format you want it (please advise)


[1] StrongARM 200MHz 32MB Flash 64MB RAM linux-2.4.18 kernel

[2] OSCAR: http://oscar-osgi.sourceforge.net

[3]
--with-engine=intrp
--enable-pure-java-math
--without-esd
--without-alsa
--with-awt=no
--with-class-library-profile=osgi_foundation

the last one is a custom profile I am trying to compile:
include only what is necessary for OSGi in order to reduce rt.jar
Index: kaffe/kaffevm/classMethod.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/classMethod.c,v
retrieving revision 1.117
diff -u -r1.117 classMethod.c
--- kaffe/kaffevm/classMethod.c 2 Apr 2004 21:27:44 -0000       1.117
+++ kaffe/kaffevm/classMethod.c 5 Apr 2004 12:57:50 -0000
@@ -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/kaffevm/exception.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/exception.c,v
retrieving revision 1.81
diff -u -r1.81 exception.c
--- kaffe/kaffevm/exception.c   2 Apr 2004 21:27:44 -0000       1.81
+++ kaffe/kaffevm/exception.c   5 Apr 2004 12:57:50 -0000
@@ -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/kaffevm/jni.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/jni.c,v
retrieving revision 1.108
diff -u -r1.108 jni.c
--- kaffe/kaffevm/jni.c 4 Apr 2004 04:15:37 -0000       1.108
+++ kaffe/kaffevm/jni.c 5 Apr 2004 12:57:56 -0000
@@ -4456,6 +4456,7 @@
        Kaffe_AttachCurrentThread,
        Kaffe_DetachCurrentThread,
        Kaffe_GetEnv,
+       NULL
 };
 
 /*
Index: kaffe/kaffevm/soft.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/soft.c,v
retrieving revision 1.59
diff -u -r1.59 soft.c
--- kaffe/kaffevm/soft.c        3 Apr 2004 00:06:10 -0000       1.59
+++ kaffe/kaffevm/soft.c        5 Apr 2004 12:57:58 -0000
@@ -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/kaffevm/stackTrace.h
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/stackTrace.h,v
retrieving revision 1.13
diff -u -r1.13 stackTrace.h
--- kaffe/kaffevm/stackTrace.h  27 Jul 2003 16:53:47 -0000      1.13
+++ kaffe/kaffevm/stackTrace.h  5 Apr 2004 12:57:58 -0000
@@ -30,5 +30,6 @@
 #define ENDOFSTACK     ((struct _methods*)-1)
 
 Hjava_lang_Object*     buildStackTrace(struct _exceptionFrame*);
-
+HArrayOfObject*     getStackTraceElements(struct Hjava_lang_VMThrowable* state, 
struct Hjava_lang_Throwable* throwable);
+void                printStackTrace(struct Hjava_lang_Throwable* o, struct 
Hjava_lang_Object* p, int nullOK);
 #endif
Index: kaffe/kaffevm/support.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/support.c,v
retrieving revision 1.63
diff -u -r1.63 support.c
--- kaffe/kaffevm/support.c     24 Mar 2004 22:54:51 -0000      1.63
+++ kaffe/kaffevm/support.c     5 Apr 2004 12:57:59 -0000
@@ -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/kaffevm/support.h
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/support.h,v
retrieving revision 1.30
diff -u -r1.30 support.h
--- kaffe/kaffevm/support.h     29 Mar 2004 21:39:14 -0000      1.30
+++ kaffe/kaffevm/support.h     5 Apr 2004 12:58:02 -0000
@@ -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/kaffevm/verify.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/verify.c,v
retrieving revision 1.72
diff -u -r1.72 verify.c
--- kaffe/kaffevm/verify.c      8 Mar 2004 21:21:10 -0000       1.72
+++ kaffe/kaffevm/verify.c      5 Apr 2004 12:58:08 -0000
@@ -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/kaffevm/intrp/machine.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/intrp/machine.c,v
retrieving revision 1.41
diff -u -r1.41 machine.c
--- kaffe/kaffevm/intrp/machine.c       10 Feb 2004 17:16:39 -0000      1.41
+++ kaffe/kaffevm/intrp/machine.c       5 Apr 2004 12:58:09 -0000
@@ -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/kaffevm/jit/machine.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/jit/machine.c,v
retrieving revision 1.62
diff -u -r1.62 machine.c
--- kaffe/kaffevm/jit/machine.c 9 Mar 2004 15:15:35 -0000       1.62
+++ kaffe/kaffevm/jit/machine.c 5 Apr 2004 12:58:11 -0000
@@ -904,7 +904,7 @@
 /*
  * return what engine we're using
  */
-char* 
+const char* 
 getEngine(void)
 {
        return "kaffe.jit";
Index: kaffe/kaffevm/jit3/machine.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/jit3/machine.c,v
retrieving revision 1.49
diff -u -r1.49 machine.c
--- kaffe/kaffevm/jit3/machine.c        2 Apr 2004 21:27:47 -0000       1.49
+++ kaffe/kaffevm/jit3/machine.c        5 Apr 2004 12:58:13 -0000
@@ -1472,7 +1472,7 @@
 /*
  * return what engine we're using
  */
-char*
+const char*
 getEngine(void)
 {
        return "kaffe.jit";

Reply via email to