[kaffe] warning hunt
Nektarios K. Papadopoulos
npapadop@inaccessnetworks.com
Wed Apr 7 01:13:02 2004
This is a multi-part message in MIME format.
--------------000904010401070607050509
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
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
--------------000904010401070607050509
Content-Type: text/plain;
name="itypes.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="itypes.diff"
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);
--------------000904010401070607050509--