[kaffe] CVS kaffe (dalibor): Small gcc warning fixes
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Thu Sep 11 09:54:02 2003
PatchSet 4025
Date: 2003/09/11 16:51:18
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Small gcc warning fixes
Members:
ChangeLog:1.1621->1.1622
include/kaffe/jmalloc.h:1.3->1.4
kaffe/kaffevm/external.c:1.48->1.49
kaffe/kaffevm/verify.c:1.26->1.27
kaffe/kaffevm/systems/unix-jthreads/jqueue.c:1.3->1.4
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1621 kaffe/ChangeLog:1.1622
--- kaffe/ChangeLog:1.1621 Thu Sep 11 15:50:35 2003
+++ kaffe/ChangeLog Thu Sep 11 16:51:18 2003
@@ -1,3 +1,18 @@
+2003-09-11 Dalibor Topic <robilad@kaffe.org>
+
+ * kaffe/kaffevm/external.c:
+ (loadNativeLibrary2) Removed unused variable vars.
+
+ * kaffe/kaffevm/systems/unix-jthreads/jqueue.c:
+ (KaffePoolReleaseNode) Removed unused variable node_id.
+
+ * include/kaffe/jmalloc.h:
+ [KAFFE_DEBUG](KFREE) Added const to parameter declaration to avoid
+ compiler warnings.
+
+ * kaffe/kaffevm/verify.c:
+ (resolveType) Initialize tmp before use.
+
2003-09-09 Ito Kazumitsu <kaz@maczuka.gcd.org>
* test/regression/InetAddressTest.java:
Index: kaffe/include/kaffe/jmalloc.h
diff -u kaffe/include/kaffe/jmalloc.h:1.3 kaffe/include/kaffe/jmalloc.h:1.4
--- kaffe/include/kaffe/jmalloc.h:1.3 Fri Sep 5 23:12:55 2003
+++ kaffe/include/kaffe/jmalloc.h Thu Sep 11 16:51:20 2003
@@ -33,7 +33,7 @@
* to aid debugging.
* */
#undef KFREE
-static inline void KFREE(void *p) {
+static inline void KFREE(const void *p) {
jfree ((void *)p);
p = (void *)0;
}
Index: kaffe/kaffe/kaffevm/external.c
diff -u kaffe/kaffe/kaffevm/external.c:1.48 kaffe/kaffe/kaffevm/external.c:1.49
--- kaffe/kaffe/kaffevm/external.c:1.48 Tue Jul 8 14:54:49 2003
+++ kaffe/kaffe/kaffevm/external.c Thu Sep 11 16:51:20 2003
@@ -323,7 +323,8 @@
func = loadNativeLibrarySym("JNI_OnLoad");
if (func != NULL) {
JavaVM *jvm = &Kaffe_JavaVM;
- jint vers = ((jint(JNICALL *)(JavaVM *, void *))func)(jvm, NULL);
+ /* Call JNI_OnLoad */
+ ((jint(JNICALL *)(JavaVM *, void *))func)(jvm, NULL);
}
return index;
Index: kaffe/kaffe/kaffevm/verify.c
diff -u kaffe/kaffe/kaffevm/verify.c:1.26 kaffe/kaffe/kaffevm/verify.c:1.27
--- kaffe/kaffe/kaffevm/verify.c:1.26 Sun Aug 31 22:09:02 2003
+++ kaffe/kaffe/kaffevm/verify.c Thu Sep 11 16:51:20 2003
@@ -4275,7 +4275,7 @@
resolveType(errorInfo* einfo, Hjava_lang_Class* this, Type *type)
{
const char* sig;
- char* tmp;
+ char* tmp = NULL;
if (type->tinfo & TINFO_NAME) {
sig = type->data.sig;
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/jqueue.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/jqueue.c:1.3 kaffe/kaffe/kaffevm/systems/unix-jthreads/jqueue.c:1.4
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/jqueue.c:1.3 Mon Aug 25 07:48:26 2003
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/jqueue.c Thu Sep 11 16:51:21 2003
@@ -114,14 +114,12 @@
void KaffePoolReleaseNode(KaffePool *pool, KaffeNodeQueue *node)
{
- int node_id;
-
assert(pool != NULL);
/*
* This check cannot be done anymore as there different pools
* now.
*
- * node_id = (int)(node-pool->pool)/sizeof(KaffeNodeQueue);
+ * int node_id = (int)(node-pool->pool)/sizeof(KaffeNodeQueue);
* assert(node_id >= 0 && node_id < pool->num_nodes_in_pool);
*/
assert(pool->num_free_nodes < pool->num_nodes_in_pool);