The attached patch fixes

9  -Wcast-qual
1 -Wunreachable-code

related to the itypes.c


P.S. I strongly suggest that the -Wconversion flag is removed. I can't see the purpose of detecting the situation it detects


cheers nek

Index: kaffe/kaffevm/itypes.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/itypes.c,v
retrieving revision 1.29
diff -u -r1.29 itypes.c
--- kaffe/kaffevm/itypes.c      8 Mar 2004 21:21:08 -0000       1.29
+++ kaffe/kaffevm/itypes.c      6 Apr 2004 12:37:53 -0000
@@ -35,7 +35,7 @@
 
 static
 void
-initPrimClass(Hjava_lang_Class** class, char* name, char sig, int len)
+initPrimClass(Hjava_lang_Class** class, const char* name, char sig, int len)
 {
        errorInfo info;
        classEntry* centry;
@@ -175,13 +175,11 @@
                start = *strp;
                for (end = start; *end != 0 && *end != ';'; end++)
                        ;
-               *strp = end;
-               if (*end == ';') {
-                       (*strp)++;
-               } else {
+               if (*end != ';') {
                        postException(einfo, JAVA_LANG(VerifyError));
                        return (NULL);
                }
+               *strp = end + 1;
                utf8 = utf8ConstNew(start, end - start);
                if (!utf8) {
                        postOutOfMemory(einfo);

Reply via email to