[kaffe] CVS kaffe (dalibor): Fixed several warnings
Kaffe CVS
cvs-commits at kaffe.org
Wed Apr 7 11:47:03 PDT 2004
PatchSet 4628
Date: 2004/04/07 18:21:10
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Fixed several warnings
2004-04-07 Nektarios K. Papadopoulos <npapadop at inaccessnetworks.com>
* kaffe/kaffevm/stackTrace.c:
Added missing prototypes.
* kaffe/kaffevm/code-analyse.c:
fixed several 'unreachable-code' and a few 'sign-compare' warnings.
Members:
ChangeLog:1.2205->1.2206
kaffe/kaffevm/code-analyse.c:1.39->1.40
kaffe/kaffevm/stackTrace.c:1.33->1.34
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2205 kaffe/ChangeLog:1.2206
--- kaffe/ChangeLog:1.2205 Tue Apr 6 19:51:29 2004
+++ kaffe/ChangeLog Wed Apr 7 18:21:10 2004
@@ -1,3 +1,11 @@
+2004-04-07 Nektarios K. Papadopoulos <npapadop at inaccessnetworks.com>
+
+ * kaffe/kaffevm/stackTrace.c:
+ Added missing prototypes.
+
+ * kaffe/kaffevm/code-analyse.c:
+ fixed several 'unreachable-code' and a few 'sign-compare' warnings.
+
2004-04-06 Dalibor Topic <robilad at kaffe.org>
* configure:
Index: kaffe/kaffe/kaffevm/code-analyse.c
diff -u kaffe/kaffe/kaffevm/code-analyse.c:1.39 kaffe/kaffe/kaffevm/code-analyse.c:1.40
--- kaffe/kaffe/kaffevm/code-analyse.c:1.39 Mon Sep 22 15:31:24 2003
+++ kaffe/kaffe/kaffevm/code-analyse.c Wed Apr 7 18:21:11 2004
@@ -261,7 +261,7 @@
/* Setup exception info. */
sp = meth->localsz + meth->stacksz - 1;
if (meth->exception_table != 0) {
- for (lcl = 0; lcl < meth->exception_table->length; lcl++) {
+ for (lcl = 0; lcl < (int32)meth->exception_table->length; lcl++) {
bool succ;
jexceptionEntry *entry;
@@ -428,9 +428,9 @@
* the handler.
*/
if (meth->exception_table != 0) {
- for (idx = 0; idx < meth->exception_table->length; idx++) {
- if (pc >= meth->exception_table->entry[idx].start_pc && pc < meth->exception_table->entry[idx].end_pc) {
- FRAMEMERGE_LOCALS(meth->exception_table->entry[idx].handler_pc);
+ for (idx = 0; idx < (int32)meth->exception_table->length; idx++) {
+ if (pc >= (int32)meth->exception_table->entry[idx].start_pc && pc < (int32)meth->exception_table->entry[idx].end_pc) {
+ FRAMEMERGE_LOCALS((int32)(meth->exception_table->entry[idx].handler_pc));
}
}
}
@@ -1396,8 +1396,7 @@
case GETSTATIC:
if (getField(WORD(pc+1), meth->class, true, &finfo, einfo) == 0) {
if (!checkNoClassDefFoundError(einfo)) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
switch (finfo.signature->data[0]){
@@ -1438,8 +1437,7 @@
case PUTSTATIC:
if (getField(WORD(pc+1), meth->class, true, &finfo, einfo) == 0) {
if (!checkNoClassDefFoundError(einfo)) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
switch (finfo.signature->data[0]){
@@ -1479,8 +1477,7 @@
case GETFIELD:
if (getField(WORD(pc+1), meth->class, false, &finfo, einfo) == 0) {
- failed = true;
- goto done;
+ goto done_fail;
}
STACKIN(0, TOBJ);
if (!FIELD_ISPRIM(finfo.field)) {
@@ -1516,8 +1513,7 @@
case PUTFIELD:
if (getField(WORD(pc+1), meth->class, false, &finfo, einfo) == 0) {
- failed = true;
- goto done;
+ goto done_fail;
}
if (!FIELD_ISPRIM(finfo.field)) {
STACKIN(0, TOBJ);
@@ -1562,8 +1558,7 @@
case INVOKESPECIAL:
if (getMethodSignatureClass(WORD(pc+1), meth->class, true, false, &call, einfo) == false) {
if (!checkNoClassDefFoundError(einfo) || call.signature == 0) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
@@ -1665,8 +1660,7 @@
case INVOKEINTERFACE:
if (getMethodSignatureClass(WORD(pc+1), meth->class, true, false, &call, einfo) == false) {
if (!checkNoClassDefFoundError(einfo) || call.signature == 0) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
@@ -1767,8 +1761,7 @@
case INVOKESTATIC:
if (getMethodSignatureClass(WORD(pc+1), meth->class, true, false, &call, einfo) == false) {
if (!checkNoClassDefFoundError(einfo) || call.signature == 0) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
@@ -1867,8 +1860,7 @@
case NEW:
if (getClass(WORD(pc+1), meth->class, einfo) == 0) {
if (!checkNoClassDefFoundError(einfo)) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
STKPUSH(1);
@@ -1885,8 +1877,7 @@
case ANEWARRAY:
if (getClass(WORD(pc+1), meth->class, einfo) == 0) {
if (!checkNoClassDefFoundError(einfo)) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
STACKIN(0, TINT);
@@ -1897,8 +1888,7 @@
case MULTIANEWARRAY:
if (getClass(WORD(pc+1), meth->class, einfo) == 0) {
if (!checkNoClassDefFoundError(einfo)) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
for (idx = INSN(pc+3) - 1; idx >= 0; idx--) {
@@ -1924,8 +1914,7 @@
case CHECKCAST:
if (getClass(WORD(pc+1), meth->class, einfo) == 0) {
if (!checkNoClassDefFoundError(einfo)) {
- failed = true;
- goto done;
+ goto done_fail;
}
}
STACKIN(0, TOBJ);
@@ -1936,8 +1925,6 @@
case INSTANCEOF:
if (getClass(WORD(pc+1), meth->class, einfo) == 0) {
if (!checkNoClassDefFoundError(einfo)) {
- failed = true;
- goto done;
}
}
STACKIN(0, TOBJ);
@@ -1989,6 +1976,10 @@
KFREE(activeFrame);
return (failed);
+
+done_fail:
+ failed = true;
+ goto done;
}
/*
Index: kaffe/kaffe/kaffevm/stackTrace.c
diff -u kaffe/kaffe/kaffevm/stackTrace.c:1.33 kaffe/kaffe/kaffevm/stackTrace.c:1.34
--- kaffe/kaffe/kaffevm/stackTrace.c:1.33 Sat Apr 3 00:06:10 2004
+++ kaffe/kaffe/kaffevm/stackTrace.c Wed Apr 7 18:21:11 2004
@@ -43,6 +43,8 @@
static Method*
stacktraceFindMethod (uintp fp, uintp pc);
+HArrayOfObject* getStackTraceElements(struct Hjava_lang_VMThrowable*, struct Hjava_lang_Throwable*);
+void printStackTrace(struct Hjava_lang_Throwable*, struct Hjava_lang_Object*, int);
Hjava_lang_Object*
buildStackTrace(struct _exceptionFrame* base)
More information about the kaffe
mailing list