[kaffe] CVS kaffe (dalibor): Small warning fixes
Kaffe CVS
cvs-commits at kaffe.org
Thu Apr 22 02:41:01 PDT 2004
PatchSet 4674
Date: 2004/04/22 09:22:35
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Small warning fixes
2004-04-22 Dalibor Topic <robilad at kaffe.org>
* libraries/clib/native/Compiler.c:
Removed. The class is pure java now, and it still does
nothing.
* libraries/clib/native/Makefile.am:
(LANG_SRCS): Remove Compiler.c.
* libraries/clib/native/Makefile.in:
Regenerated.
* libraries/javalib/bootstrap.classlist:
Removed java/lang/Compiler.class.
* include/Makefile.am:
(NOINSTALL_DERIVED_HDRS): Remove java_lang_Compiler.h.
* include/Makefile.in:
Regenerated.
* kaffe/kaffeh/sigs.c:
(translateSigType): removed unused function.
* kaffe/kaffeh/support.c:
(constValueToString) Removed unused parameter cvalsize.
* kaffe/kaffevm/constants.c,
kaffe/kaffevm/debug.c:
Fixed signed-unsigned comparison warnings.
* kaffe/kaffevm/gtypes.h:
(strconst) Removed const qualifier from data char array to fix
compiler warnings.
* kaffe/kaffevm/utf8const.c,
kaffe/kaffevm/utf8const.h:
(utf8ConstEqual) Deinlined due to compiler warnings, and moved
into utf8const.c.
Members:
ChangeLog:1.2250->1.2251
include/Makefile.am:1.57->1.58
include/Makefile.in:1.153->1.154
kaffe/kaffeh/sigs.c:1.6->1.7
kaffe/kaffeh/support.c:1.42->1.43
kaffe/kaffevm/constants.c:1.17->1.18
kaffe/kaffevm/debug.c:1.51->1.52
kaffe/kaffevm/gtypes.h:1.11->1.12
kaffe/kaffevm/utf8const.c:1.36->1.37
kaffe/kaffevm/utf8const.h:1.4->1.5
libraries/clib/native/Compiler.c:1.6->1.7(DEAD)
libraries/clib/native/Makefile.am:1.31->1.32
libraries/clib/native/Makefile.in:1.132->1.133
libraries/javalib/bootstrap.classlist:1.46->1.47
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2250 kaffe/ChangeLog:1.2251
--- kaffe/ChangeLog:1.2250 Thu Apr 22 08:13:54 2004
+++ kaffe/ChangeLog Thu Apr 22 09:22:35 2004
@@ -1,3 +1,43 @@
+2004-04-22 Dalibor Topic <robilad at kaffe.org>
+
+ * libraries/clib/native/Compiler.c:
+ Removed. The class is pure java now, and it still does
+ nothing.
+
+ * libraries/clib/native/Makefile.am:
+ (LANG_SRCS): Remove Compiler.c.
+
+ * libraries/clib/native/Makefile.in:
+ Regenerated.
+
+ * libraries/javalib/bootstrap.classlist:
+ Removed java/lang/Compiler.class.
+
+ * include/Makefile.am:
+ (NOINSTALL_DERIVED_HDRS): Remove java_lang_Compiler.h.
+
+ * include/Makefile.in:
+ Regenerated.
+
+ * kaffe/kaffeh/sigs.c:
+ (translateSigType): removed unused function.
+
+ * kaffe/kaffeh/support.c:
+ (constValueToString) Removed unused parameter cvalsize.
+
+ * kaffe/kaffevm/constants.c,
+ kaffe/kaffevm/debug.c:
+ Fixed signed-unsigned comparison warnings.
+
+ * kaffe/kaffevm/gtypes.h:
+ (strconst) Removed const qualifier from data char array to fix
+ compiler warnings.
+
+ * kaffe/kaffevm/utf8const.c,
+ kaffe/kaffevm/utf8const.h:
+ (utf8ConstEqual) Deinlined due to compiler warnings, and moved
+ into utf8const.c.
+
2004-04-22 Helmer Kraemer <hkraemer at freenet.de>
* kaffe/kaffevm/thread.c, kaffe/kaffevm/thread.h
Index: kaffe/include/Makefile.am
diff -u kaffe/include/Makefile.am:1.57 kaffe/include/Makefile.am:1.58
--- kaffe/include/Makefile.am:1.57 Wed Apr 14 19:39:48 2004
+++ kaffe/include/Makefile.am Thu Apr 22 09:22:37 2004
@@ -4,6 +4,8 @@
# Transvirtual Technologies, Inc. All rights reserved.
# Copyright (c) 2003
# Mark Wielaard <mark at klomp.org>
+# Copyright (c) 2004
+# Kaffe.org contributors. All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution
# of this file.
@@ -57,7 +59,6 @@
java_lang_Class.h \
java_lang_ClassLoader.h \
java_lang_Cloneable.h \
- java_lang_Compiler.h \
java_lang_Double.h \
java_lang_Float.h \
java_lang_Integer.h \
Index: kaffe/include/Makefile.in
diff -u kaffe/include/Makefile.in:1.153 kaffe/include/Makefile.in:1.154
--- kaffe/include/Makefile.in:1.153 Wed Apr 14 19:39:49 2004
+++ kaffe/include/Makefile.in Thu Apr 22 09:22:37 2004
@@ -20,6 +20,8 @@
# Transvirtual Technologies, Inc. All rights reserved.
# Copyright (c) 2003
# Mark Wielaard <mark at klomp.org>
+# Copyright (c) 2004
+# Kaffe.org contributors. All rights reserved.
#
# See the file "license.terms" for information on usage and redistribution
# of this file.
@@ -369,7 +371,6 @@
java_lang_Class.h \
java_lang_ClassLoader.h \
java_lang_Cloneable.h \
- java_lang_Compiler.h \
java_lang_Double.h \
java_lang_Float.h \
java_lang_Integer.h \
Index: kaffe/kaffe/kaffeh/sigs.c
diff -u kaffe/kaffe/kaffeh/sigs.c:1.6 kaffe/kaffe/kaffeh/sigs.c:1.7
--- kaffe/kaffe/kaffeh/sigs.c:1.6 Thu Jan 22 19:54:23 2004
+++ kaffe/kaffe/kaffeh/sigs.c Thu Apr 22 09:22:37 2004
@@ -141,57 +141,3 @@
return (fp);
}
-
-/*
- * Translate signature to union type.
- */
-const char*
-translateSigType(const char* str, char* type)
-{
- switch (*str++) {
- case 'L':
- type[0] = 'p';
- while (*str != ';') {
- str++;
- }
- str++;
- break;
- case '[':
- type[0] = 'p';
- if (*str++ == 'L') {
- while (*str != ';') {
- str++;
- }
- str++;
- }
- break;
- case 'B':
- type[0] = 'b';
- break;
- case 'C':
- type[0] = 'c';
- break;
- case 'I':
- type[0] = 'i';
- break;
- case 'S':
- type[0] = 's';
- break;
- case 'Z':
- type[0] = 'z';
- break;
- case 'D':
- type[0] = 'd';
- break;
- case 'F':
- type[0] = 'f';
- break;
- case 'J':
- type[0] = 'l';
- break;
- case 'V':
- type[0] = 'v';
- break;
- }
- return (str);
-}
Index: kaffe/kaffe/kaffeh/support.c
diff -u kaffe/kaffe/kaffeh/support.c:1.42 kaffe/kaffe/kaffeh/support.c:1.43
--- kaffe/kaffe/kaffeh/support.c:1.42 Fri Apr 2 21:27:39 2004
+++ kaffe/kaffe/kaffeh/support.c Thu Apr 22 09:22:37 2004
@@ -445,7 +445,7 @@
static void
constValueToString(Hjava_lang_Class* this, u2 idx,
- char *cval, int cvalsize UNUSED)
+ char *cval)
{
/* XXX use snprintf() */
@@ -482,7 +482,6 @@
break;
default:
sprintf(cval, "?unsupported type tag %d?", CLASS_CONST_TAG(this, idx));
- break;
}
}
@@ -494,8 +493,8 @@
if ((f->accflags & (ACC_STATIC|ACC_PUBLIC|ACC_FINAL)) == (ACC_STATIC|ACC_PUBLIC|ACC_FINAL)) {
char cval[512];
-
- constValueToString(this, idx, cval, sizeof(cval));
+
+ constValueToString(this, idx, cval);
if (cval[0] != '\0') {
if (include != NULL) {
Index: kaffe/kaffe/kaffevm/constants.c
diff -u kaffe/kaffe/kaffevm/constants.c:1.17 kaffe/kaffe/kaffevm/constants.c:1.18
--- kaffe/kaffe/kaffevm/constants.c:1.17 Sun Aug 31 22:09:01 2003
+++ kaffe/kaffe/kaffevm/constants.c Thu Apr 22 09:22:37 2004
@@ -38,8 +38,8 @@
constants* info = CLASS_CONSTANTS (this);
ConstSlot* pool;
u1* tags;
- int i;
- int j;
+ unsigned int i;
+ unsigned int j;
u1 type;
u2 len;
u2 d2, d2b;
@@ -193,9 +193,9 @@
type);
fail:
info->size = 0;
- while (--i >= 0) {
- if (tags[i] == CONSTANT_Utf8) {
- utf8ConstRelease((Utf8Const*)pool[i]);
+ for (j = 0 ; j < i; ++j) {
+ if (tags[j] == CONSTANT_Utf8) {
+ utf8ConstRelease((Utf8Const*)pool[j]);
}
}
return false;
Index: kaffe/kaffe/kaffevm/debug.c
diff -u kaffe/kaffe/kaffevm/debug.c:1.51 kaffe/kaffe/kaffevm/debug.c:1.52
--- kaffe/kaffe/kaffevm/debug.c:1.51 Sun Apr 18 13:57:26 2004
+++ kaffe/kaffe/kaffevm/debug.c Thu Apr 22 09:22:37 2004
@@ -186,7 +186,7 @@
int
dbgSetMaskStr(const char *orig_mask_str)
{
- int i;
+ unsigned int i;
char *mask_str;
const char *separators = "|,";
char *opt;
@@ -357,8 +357,8 @@
static void
printDebugBuffer(void)
{
- int i = 0;
- int end = bufferBegin;
+ unsigned int i = 0;
+ unsigned int end = bufferBegin;
i = bufferBegin;
assert(i != 0);
Index: kaffe/kaffe/kaffevm/gtypes.h
diff -u kaffe/kaffe/kaffevm/gtypes.h:1.11 kaffe/kaffe/kaffevm/gtypes.h:1.12
--- kaffe/kaffe/kaffevm/gtypes.h:1.11 Thu Mar 25 09:57:58 2004
+++ kaffe/kaffe/kaffevm/gtypes.h Thu Apr 22 09:22:38 2004
@@ -138,7 +138,7 @@
int32 hash; /* Hash code (== String.hashCode()) */
int32 nrefs; /* Number of references */
int32 length;
- const char data[sizeof(int32)]; /* In UTF-8 format, with final '\0' */
+ char data[sizeof(int32)]; /* In UTF-8 format, with final '\0' */
};
#define SHIFT_jchar 1
Index: kaffe/kaffe/kaffevm/utf8const.c
diff -u kaffe/kaffe/kaffevm/utf8const.c:1.36 kaffe/kaffe/kaffevm/utf8const.c:1.37
--- kaffe/kaffe/kaffevm/utf8const.c:1.36 Sun Apr 18 13:57:27 2004
+++ kaffe/kaffe/kaffevm/utf8const.c Thu Apr 22 09:22:38 2004
@@ -417,3 +417,27 @@
DBG(INIT, dprintf("utf8ConstInit() done\n"); )
}
+
+bool
+utf8ConstEqual(Utf8Const* a, Utf8Const* b)
+{
+ assert(a != NULL);
+ assert(a->nrefs >= 1);
+ assert(b != NULL);
+ assert(b->nrefs >= 1);
+
+#ifdef KAFFEH
+ /* Do the full compare (Kaffeh doesn't intern Utf8s) */
+ return (0 == strcmp(a->data, b->data));
+#else
+#ifdef KAFFE_VMDEBUG
+ /* If they're different pointers, double check that they're different strings... */
+ if ((a != b) && (a->hash == b->hash))
+ {
+ assert(strcmp(a->data,b->data));
+ }
+#endif
+ /* Since we intern all UTF-8 constants, we can do this: */
+ return (a == b);
+#endif
+}
Index: kaffe/kaffe/kaffevm/utf8const.h
diff -u kaffe/kaffe/kaffevm/utf8const.h:1.4 kaffe/kaffe/kaffevm/utf8const.h:1.5
--- kaffe/kaffe/kaffevm/utf8const.h:1.4 Fri Apr 16 17:16:24 2004
+++ kaffe/kaffe/kaffevm/utf8const.h Thu Apr 22 09:22:38 2004
@@ -60,29 +60,7 @@
*/
extern void utf8ConstEncodeTo(const jchar *chars, int clength, char *buf);
-static inline bool utf8ConstEqual(Utf8Const* a, Utf8Const* b) __UNUSED__;
-static inline bool utf8ConstEqual(Utf8Const* a, Utf8Const* b)
-{
- assert(a != NULL);
- assert(a->nrefs >= 1);
- assert(b != NULL);
- assert(b->nrefs >= 1);
-
-#ifdef KAFFEH
- /* Do the full compare (Kaffeh doesn't intern Utf8s) */
- return (0 == strcmp(a->data, b->data));
-#else
-#ifdef KAFFE_VMDEBUG
- /* If they're different pointers, double check that they're different strings... */
- if ((a != b) && (a->hash == b->hash))
- {
- assert(strcmp(a->data,b->data));
- }
-#endif
- /* Since we intern all UTF-8 constants, we can do this: */
- return (a == b);
-#endif
-}
+extern bool utf8ConstEqual(Utf8Const* a, Utf8Const* b);
/* Since we compute hash values at creation time, we can do this: */
static inline int32 utf8ConstHashValue(Utf8Const* a) __UNUSED__;
===================================================================
Checking out kaffe/libraries/clib/native/Compiler.c
RCS: /home/cvs/kaffe/kaffe/libraries/clib/native/Attic/Compiler.c,v
VERS: 1.6
***************
--- kaffe/libraries/clib/native/Compiler.c Thu Apr 22 09:26:31 2004
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,53 +0,0 @@
-/*
- * java.lang.Compiler.c
- *
- * Copyright (c) 1996, 1997
- * Transvirtual Technologies, Inc. All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file.
- */
-
-#include "config.h"
-#include <assert.h>
-#include <stdlib.h>
-#include <native.h>
-#include "../../../kaffe/kaffevm/baseClasses.h"
-#include "../../../kaffe/kaffevm/support.h"
-#include "java_lang_Compiler.h"
-
-void
-java_lang_Compiler_initialize(void)
-{
- unimp("java.lang.Compiler:initialize unimplemented");
-}
-
-jbool
-java_lang_Compiler_compileClass(struct Hjava_lang_Class* class UNUSED)
-{
- unimp("java.lang.Compiler:compilerClass unimplemented");
-}
-
-jbool
-java_lang_Compiler_compileClasses(struct Hjava_lang_String* str UNUSED)
-{
- unimp("java.lang.Compiler:compileClasses unimplemented");
-}
-
-struct Hjava_lang_Object*
-java_lang_Compiler_command(struct Hjava_lang_Object* obj UNUSED)
-{
- unimp("java.lang.Compiler:command unimplemented");
-}
-
-void
-java_lang_Compiler_enable(void)
-{
- unimp("java.lang.Compiler:enable unimplemented");
-}
-
-void
-java_lang_Compiler_disable(void)
-{
- unimp("java.lang.Compiler:disable unimplemented");
-}
Index: kaffe/libraries/clib/native/Makefile.am
diff -u kaffe/libraries/clib/native/Makefile.am:1.31 kaffe/libraries/clib/native/Makefile.am:1.32
--- kaffe/libraries/clib/native/Makefile.am:1.31 Mon Apr 12 11:40:07 2004
+++ kaffe/libraries/clib/native/Makefile.am Thu Apr 22 09:22:38 2004
@@ -3,6 +3,9 @@
# Copyright (c) 1996, 1997, 1998, 1999
# Transvirtual Technologies, Inc. All rights reserved.
#
+# Copyright (c) 2004
+# Kaffe.org contributors. All rights reserved.
+#
# See the file "license.terms" for information on usage and redistribution
# of this file.
@@ -19,7 +22,6 @@
LANG_SRCS = \
Class.c \
ClassLoader.c \
- Compiler.c \
Double.c \
Float.c \
Math.c \
Index: kaffe/libraries/clib/native/Makefile.in
diff -u kaffe/libraries/clib/native/Makefile.in:1.132 kaffe/libraries/clib/native/Makefile.in:1.133
--- kaffe/libraries/clib/native/Makefile.in:1.132 Wed Apr 14 19:40:15 2004
+++ kaffe/libraries/clib/native/Makefile.in Thu Apr 22 09:22:38 2004
@@ -19,6 +19,9 @@
# Copyright (c) 1996, 1997, 1998, 1999
# Transvirtual Technologies, Inc. All rights reserved.
#
+# Copyright (c) 2004
+# Kaffe.org contributors. All rights reserved.
+#
# See the file "license.terms" for information on usage and redistribution
# of this file.
@@ -75,8 +78,8 @@
$(am__DEPENDENCIES_1)
am__objects_1 = ByteToCharDefault.lo ByteToCharIconv.lo \
CharToByteDefault.lo CharToByteIconv.lo
-am__objects_2 = Class.lo ClassLoader.lo Compiler.lo Double.lo Float.lo \
- Math.lo MemoryAdvice.lo NativeLibrary.lo Object.lo \
+am__objects_2 = Class.lo ClassLoader.lo Double.lo Float.lo Math.lo \
+ MemoryAdvice.lo NativeLibrary.lo Object.lo \
PrimordialClassLoader.lo Runtime.lo String.lo System.lo \
Thread.lo ThreadStack.lo Throwable.lo UNIXProcess.lo \
ZipFile.lo
@@ -97,7 +100,6 @@
@AMDEP_TRUE@ ./$(DEPDIR)/CharToByteDefault.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/CharToByteIconv.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/Class.Plo ./$(DEPDIR)/ClassLoader.Plo \
- at AMDEP_TRUE@ ./$(DEPDIR)/Compiler.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/Constructor.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/DateFormat.Plo ./$(DEPDIR)/Double.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/Field.Plo ./$(DEPDIR)/Float.Plo \
@@ -374,7 +376,6 @@
LANG_SRCS = \
Class.c \
ClassLoader.c \
- Compiler.c \
Double.c \
Float.c \
Math.c \
@@ -493,7 +494,6 @@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/CharToByteIconv.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Class.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ClassLoader.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Compiler.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Constructor.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/DateFormat.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Double.Plo at am__quote@
Index: kaffe/libraries/javalib/bootstrap.classlist
diff -u kaffe/libraries/javalib/bootstrap.classlist:1.46 kaffe/libraries/javalib/bootstrap.classlist:1.47
--- kaffe/libraries/javalib/bootstrap.classlist:1.46 Wed Apr 14 19:40:34 2004
+++ kaffe/libraries/javalib/bootstrap.classlist Thu Apr 22 09:22:38 2004
@@ -299,7 +299,6 @@
kaffe/security/provider/MD4.class
kaffe/security/provider/MD5.class
kaffe/security/provider/SHA.class
-java/lang/Compiler.class
java/lang/reflect/Field.class
kaffe/lang/UNIXProcess.class
java/net/DatagramSocketImpl.class
More information about the kaffe
mailing list