[kaffe] CVS kaffe (doogie): More UNUSED warning fixes.
Kaffe CVS
cvs-commits at kaffe.org
Fri Apr 2 16:10:03 PST 2004
PatchSet 4609
Date: 2004/04/03 00:06:12
Author: doogie
Branch: HEAD
Tag: (none)
Log:
More UNUSED warning fixes.
Members:
ChangeLog:1.2186->1.2187
kaffe/kaffevm/soft.c:1.58->1.59
kaffe/kaffevm/stackTrace.c:1.32->1.33
kaffe/kaffevm/string.c:1.28->1.29
kaffe/kaffevm/mem/gc-incremental.c:1.76->1.77
kaffe/kaffevm/mem/gc-mem.c:1.55->1.56
libraries/clib/awt/X/cbd.c:1.4->1.5
libraries/clib/awt/X/clr.c:1.25->1.26
libraries/clib/awt/X/evt.c:1.23->1.24
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2186 kaffe/ChangeLog:1.2187
--- kaffe/ChangeLog:1.2186 Fri Apr 2 21:54:21 2004
+++ kaffe/ChangeLog Sat Apr 3 00:06:12 2004
@@ -1,3 +1,11 @@
+2004-04-02 Adam Heath <doogie at debian.org>
+
+ * kaffe/kaffevm/soft.c, kaffe/kaffevm/stackTrace.c,
+ kaffe/kaffevm/string.c, kaffe/kaffevm/mem/gc-incremental.c,
+ kaffe/kaffevm/mem/gc-mem.c, libraries/clib/awt/X/cbd.c,
+ libraries/clib/awt/X/clr.c, libraries/clib/awt/X/evt.c:
+ More UNUSED warning fixes.
+
2004-04-02 Dalibor Topic <robilad at kaffe.org>
* config/sparc/openbsd2/jit-md.h:
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.58 kaffe/kaffe/kaffevm/soft.c:1.59
--- kaffe/kaffe/kaffevm/soft.c:1.58 Mon Mar 8 21:21:10 2004
+++ kaffe/kaffe/kaffevm/soft.c Sat Apr 3 00:06:10 2004
@@ -1107,23 +1107,23 @@
}
void
-soft_debug1(void* a0, void* a1, void* a2)
+soft_debug1(void* a0 UNUSED, void* a1 UNUSED, void* a2 UNUSED)
{
}
void
-soft_debug2(void* a0, void* a1, void* a2)
+soft_debug2(void* a0 UNUSED, void* a1 UNUSED, void* a2 UNUSED)
{
}
void
-soft_trace(Method* meth, void* args)
+soft_trace(Method* meth, void* args UNUSED)
{
dprintf("soft_trace: %s.%s%s\n", CLASS_CNAME(meth->class), meth->name->data, METHOD_SIGD(meth));
}
void
-soft_enter_method(Hjava_lang_Object *obj, Method *meth)
+soft_enter_method(Hjava_lang_Object *obj UNUSED, Method *meth UNUSED)
{
#if defined(ENABLE_JVMPI)
if( JVMPI_EVENT_ISENABLED(JVMPI_EVENT_METHOD_ENTRY) )
@@ -1146,10 +1146,10 @@
#endif
}
+#if defined(ENABLE_JVMPI)
void
soft_exit_method(Method *meth)
{
-#if defined(ENABLE_JVMPI)
if( JVMPI_EVENT_ISENABLED(JVMPI_EVENT_METHOD_EXIT) )
{
JVMPI_Event ev;
@@ -1158,5 +1158,10 @@
ev.u.method.method_id = meth;
jvmpiPostEvent(&ev);
}
-#endif
}
+#else
+void
+soft_exit_method(Method *meth UNUSED)
+{
+}
+#endif
Index: kaffe/kaffe/kaffevm/stackTrace.c
diff -u kaffe/kaffe/kaffevm/stackTrace.c:1.32 kaffe/kaffe/kaffevm/stackTrace.c:1.33
--- kaffe/kaffe/kaffevm/stackTrace.c:1.32 Mon Mar 8 21:21:10 2004
+++ kaffe/kaffe/kaffevm/stackTrace.c Sat Apr 3 00:06:10 2004
@@ -94,7 +94,7 @@
#if defined(TRANSLATOR)
static Method*
-stacktraceFindMethod(uintp fp, uintp pc)
+stacktraceFindMethod(uintp fp UNUSED, uintp pc)
{
void *pc_base = GC_getObjectBase(main_collector, (void *)pc);
@@ -107,7 +107,7 @@
#elif defined(INTERPRETER)
static Method*
-stacktraceFindMethod(uintp fp, uintp pc)
+stacktraceFindMethod(uintp fp, uintp pc UNUSED)
{
return (vmExcept_isJNIFrame ((VmExceptHandler *)fp)?0:((VmExceptHandler *)fp)->meth);
}
Index: kaffe/kaffe/kaffevm/string.c
diff -u kaffe/kaffe/kaffevm/string.c:1.28 kaffe/kaffe/kaffevm/string.c:1.29
--- kaffe/kaffe/kaffevm/string.c:1.28 Sat Oct 11 20:45:49 2003
+++ kaffe/kaffe/kaffevm/string.c Sat Apr 3 00:06:10 2004
@@ -495,7 +495,7 @@
* Walk a java.lang.String object
*/
void
-stringWalk(Collector* collector, void* str, uint32 size)
+stringWalk(Collector* collector, void* str, uint32 size UNUSED)
{
/* That's all we have to do here */
GC_markObject(collector, unhand((Hjava_lang_String*)str)->value);
@@ -506,7 +506,7 @@
*/
void
/* ARGSUSED */
-stringDestroy(Collector* collector, void* obj)
+stringDestroy(Collector* collector UNUSED, void* obj)
{
Hjava_lang_String* str = (Hjava_lang_String*)obj;
Index: kaffe/kaffe/kaffevm/mem/gc-incremental.c
diff -u kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.76 kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.77
--- kaffe/kaffe/kaffevm/mem/gc-incremental.c:1.76 Mon Mar 29 21:13:34 2004
+++ kaffe/kaffe/kaffevm/mem/gc-incremental.c Sat Apr 3 00:06:13 2004
@@ -196,7 +196,7 @@
* is for statistical purposes.
*/
static void
-gcRegisterFixedTypeByIndex(Collector* gcif,
+gcRegisterFixedTypeByIndex(Collector* gcif UNUSED,
int index, const char *description)
{
registerTypeByIndex(index, 0, GC_OBJECT_FIXED, 0, description);
@@ -206,7 +206,7 @@
* Register a allocation type that is subject to gc.
*/
static void
-gcRegisterGcTypeByIndex(Collector* gcif,
+gcRegisterGcTypeByIndex(Collector* gcif UNUSED,
int index, walk_func_t walk, final_func_t final,
destroy_func_t destroy,
const char *description)
@@ -284,7 +284,7 @@
* Mark the memory given by an address if it really is an object.
*/
static void
-gcMarkAddress(Collector* gcif, const void* mem)
+gcMarkAddress(Collector* gcif UNUSED, const void* mem)
{
gc_block* info;
gc_unit* unit;
@@ -307,7 +307,7 @@
* and never, ever, be null.
*/
static void
-gcMarkObject(Collector* gcif, const void* objp)
+gcMarkObject(Collector* gcif UNUSED, const void* objp)
{
gc_unit *unit = UTOUNIT(objp);
gc_block *info = GCMEM2BLOCK(unit);
@@ -343,14 +343,14 @@
*/
static
uint32
-gcGetObjectSize(Collector* gcif, const void* mem)
+gcGetObjectSize(Collector* gcif UNUSED, const void* mem)
{
return (GCBLOCKSIZE(GCMEM2BLOCK(UTOUNIT(mem))));
}
static
int
-gcGetObjectIndex(Collector* gcif, const void* mem)
+gcGetObjectIndex(Collector* gcif UNUSED, const void* mem)
{
gc_unit* unit = UTOUNIT(mem);
gc_block* info = GCMEM2BLOCK(unit);
@@ -371,7 +371,7 @@
*/
static
void*
-gcGetObjectBase(Collector *gcif, const void* mem)
+gcGetObjectBase(Collector *gcif UNUSED, const void* mem)
{
int idx;
gc_block* info;
@@ -469,14 +469,14 @@
#if !(defined(NDEBUG) || !defined(KAFFE_VMDEBUG))
static int
-gcClearCounts(Hjava_lang_Class *c, void *_)
+gcClearCounts(Hjava_lang_Class *c, void *_ UNUSED)
{
c->live_count = 0;
return 0;
}
static int
-gcDumpCounts(Hjava_lang_Class *c, void *_)
+gcDumpCounts(Hjava_lang_Class *c, void *_ UNUSED)
{
if (c->live_count)
dprintf("%7d %s\n", c->live_count, c->name->data);
@@ -924,7 +924,7 @@
static
void
-gcEnableGC(Collector* gcif)
+gcEnableGC(Collector* gcif UNUSED)
{
int iLockRoot;
@@ -937,7 +937,7 @@
static
void
-gcDisableGC(Collector* gcif)
+gcDisableGC(Collector* gcif UNUSED)
{
int iLockRoot;
@@ -951,7 +951,7 @@
*/
static
void
-gcInvokeGC(Collector* gcif, int mustgc)
+gcInvokeGC(Collector* gcif UNUSED, int mustgc)
{
int iLockRoot;
@@ -1005,7 +1005,7 @@
static
void*
-gcMalloc(Collector* gcif, size_t size, gc_alloc_type_t fidx)
+gcMalloc(Collector* gcif UNUSED, size_t size, gc_alloc_type_t fidx)
{
gc_block* info;
gc_unit* unit;
@@ -1144,7 +1144,7 @@
static
Hjava_lang_Throwable *
-gcThrowOOM(Collector *gcif)
+gcThrowOOM(Collector *gcif UNUSED)
{
Hjava_lang_Throwable *ret = 0;
int reffed;
@@ -1235,7 +1235,7 @@
*/
static
void
-gcFree(Collector* gcif, void* mem)
+gcFree(Collector* gcif UNUSED, void* mem)
{
gc_block* info;
int idx;
@@ -1269,7 +1269,7 @@
static
void
-gcInit(Collector *collector)
+gcInit(Collector *collector UNUSED)
{
gc_init = 1;
}
Index: kaffe/kaffe/kaffevm/mem/gc-mem.c
diff -u kaffe/kaffe/kaffevm/mem/gc-mem.c:1.55 kaffe/kaffe/kaffevm/mem/gc-mem.c:1.56
--- kaffe/kaffe/kaffevm/mem/gc-mem.c:1.55 Sat Mar 27 16:07:32 2004
+++ kaffe/kaffe/kaffevm/mem/gc-mem.c Sat Apr 3 00:06:13 2004
@@ -932,15 +932,18 @@
}
/* Free memory allocated with pagealloc */
-static void pagefree(uintp base, size_t size)
-{
#ifdef HAVE_SBRK
+static void pagefree(uintp base UNUSED, size_t size)
+{
sbrk(-size);
+}
#else
+static void pagefree(uintp base, size_t size UNUSED)
+{
/* it must have been allocated with memalign, valloc or malloc */
free((void *)base);
-#endif
}
+#endif
/*
* Allocate size bytes of heap memory, and return the corresponding
Index: kaffe/libraries/clib/awt/X/cbd.c
diff -u kaffe/libraries/clib/awt/X/cbd.c:1.4 kaffe/libraries/clib/awt/X/cbd.c:1.5
--- kaffe/libraries/clib/awt/X/cbd.c:1.4 Fri Mar 26 22:58:43 2004
+++ kaffe/libraries/clib/awt/X/cbd.c Sat Apr 3 00:06:14 2004
@@ -28,7 +28,7 @@
*/
jobject
-selectionClear ( JNIEnv* env, Toolkit* tk )
+selectionClear ( JNIEnv* env, Toolkit* tk UNUSED )
{
(*env)->CallStaticVoidMethod( env, NativeClipboard, lostOwnership);
@@ -129,7 +129,7 @@
*/
jobject
-Java_java_awt_Toolkit_cbdInitClipboard ( JNIEnv* env, jclass clazz )
+Java_java_awt_Toolkit_cbdInitClipboard ( JNIEnv* env, jclass clazz UNUSED)
{
unsigned long mask = 0;
XSetWindowAttributes attrs;
@@ -162,12 +162,12 @@
}
void
-Java_java_awt_Toolkit_cbdFreeClipboard ( JNIEnv* env, jclass clazz, ClipBoard* cbd )
+Java_java_awt_Toolkit_cbdFreeClipboard ( JNIEnv* env UNUSED, jclass clazz UNUSED, ClipBoard* cbd UNUSED )
{
}
jboolean
-Java_java_awt_Toolkit_cbdSetOwner ( JNIEnv* env, jclass clazz, ClipBoard* cbd )
+Java_java_awt_Toolkit_cbdSetOwner ( JNIEnv* env UNUSED, jclass clazz UNUSED, ClipBoard* cbd UNUSED )
{
XSetSelectionOwner( X->dsp, XA_PRIMARY, X->cbdOwner, CurrentTime);
if ( XGetSelectionOwner( X->dsp, XA_PRIMARY) != X->cbdOwner )
@@ -184,7 +184,7 @@
*/
jobject
-Java_java_awt_Toolkit_cbdGetContents ( JNIEnv* env, jclass clazz, ClipBoard* cbd )
+Java_java_awt_Toolkit_cbdGetContents ( JNIEnv* env, jclass clazz UNUSED, ClipBoard* cbd UNUSED )
{
int ret;
unsigned char *data = 0;
Index: kaffe/libraries/clib/awt/X/clr.c
diff -u kaffe/libraries/clib/awt/X/clr.c:1.25 kaffe/libraries/clib/awt/X/clr.c:1.26
--- kaffe/libraries/clib/awt/X/clr.c:1.25 Thu Sep 25 18:27:36 2003
+++ kaffe/libraries/clib/awt/X/clr.c Sat Apr 3 00:06:14 2004
@@ -355,7 +355,7 @@
static Rgb2Pseudo*
-initRgb2Pseudo ( JNIEnv* env, jclass clazz, Toolkit* X )
+initRgb2Pseudo ( JNIEnv* env, jclass clazz UNUSED, Toolkit* X )
{
Colormap dcm;
int i, j, k;
@@ -385,7 +385,7 @@
*/
static Rgb2True*
-initRgb2True (JNIEnv* env, jclass clazz, Toolkit* X )
+initRgb2True (JNIEnv* env UNUSED, jclass clazz UNUSED, Toolkit* X )
{
Visual *v = DefaultVisualOfScreen( DefaultScreenOfDisplay( X->dsp));
unsigned int m;
@@ -537,7 +537,7 @@
}
static Rgb2Direct*
-initRgb2Direct ( JNIEnv* env, jclass clazz, Toolkit* X )
+initRgb2Direct ( JNIEnv* env UNUSED, jclass clazz UNUSED, Toolkit* X )
{
Visual *v = DefaultVisualOfScreen( DefaultScreenOfDisplay( X->dsp));
Rgb2Direct *map = (Rgb2Direct*) AWT_MALLOC( sizeof( Rgb2Direct));
@@ -658,7 +658,7 @@
}
void
-Java_java_awt_Toolkit_clrSetSystemColors ( JNIEnv* env, jclass clazz, jintArray sysClrs )
+Java_java_awt_Toolkit_clrSetSystemColors ( JNIEnv* env UNUSED, jclass clazz UNUSED, jintArray sysClrs UNUSED )
{
#ifdef NEVER /* maybe this could be initialized via X resources */
jboolean isCopy;
@@ -703,7 +703,7 @@
* usable results). Even 256 colormaps suffer from that
*/
jlong
-Java_java_awt_Toolkit_clrBright ( JNIEnv* env, jclass clazz, jint rgb )
+Java_java_awt_Toolkit_clrBright ( JNIEnv* env UNUSED, jclass clazz UNUSED, jint rgb )
{
unsigned int r, g, b;
jint modRgb, modPix;
@@ -727,7 +727,7 @@
}
jlong
-Java_java_awt_Toolkit_clrDark ( JNIEnv* env, jclass clazz, jint rgb )
+Java_java_awt_Toolkit_clrDark ( JNIEnv* env UNUSED, jclass clazz UNUSED, jint rgb )
{
unsigned int r, g, b;
jint modRgb, modPix;
Index: kaffe/libraries/clib/awt/X/evt.c
diff -u kaffe/libraries/clib/awt/X/evt.c:1.23 kaffe/libraries/clib/awt/X/evt.c:1.24
--- kaffe/libraries/clib/awt/X/evt.c:1.23 Tue Jan 6 20:23:16 2004
+++ kaffe/libraries/clib/awt/X/evt.c Sat Apr 3 00:06:14 2004
@@ -9,6 +9,7 @@
*/
+#include "config.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
@@ -34,7 +35,7 @@
*
*/
-static int nextEvent ( JNIEnv* env, jclass clazz, Toolkit *X, int blockIt )
+static int nextEvent ( JNIEnv* env UNUSED, jclass clazz UNUSED, Toolkit *X, int blockIt UNUSED )
{
if ( X->preFetched )
return 1;
@@ -209,7 +210,7 @@
#endif /* defined(KAFFE_VMDEBUG) && !defined(NDEBUG) */
static jobject
-skip ( JNIEnv* env, Toolkit* X )
+skip ( JNIEnv* env UNUSED, Toolkit* X UNUSED )
{
return NULL;
}
@@ -750,7 +751,7 @@
*/
jobject
-Java_java_awt_Toolkit_evtInit ( JNIEnv* env, jclass clazz )
+Java_java_awt_Toolkit_evtInit ( JNIEnv* env, jclass clazz UNUSED )
{
jclass Component;
#if !defined(USE_POLLING_AWT)
@@ -893,7 +894,7 @@
* just dispatching this to the local queue (without passing to the server)
*/
void
-Java_java_awt_Toolkit_evtWakeup ( JNIEnv* env, jclass clazz )
+Java_java_awt_Toolkit_evtWakeup ( JNIEnv* env UNUSED, jclass clazz UNUSED )
{
XEvent event;
@@ -917,13 +918,13 @@
* the native event thread. Not required here
*/
void
-Java_java_awt_Toolkit_evtSendWMEvent ( JNIEnv* env, jclass clazz, jobject wmEvt )
+Java_java_awt_Toolkit_evtSendWMEvent ( JNIEnv* env UNUSED, jclass clazz UNUSED, jobject wmEvt UNUSED )
{
}
jint
-Java_java_awt_Toolkit_evtRegisterSource ( JNIEnv* env, jclass clazz, Window wnd )
+Java_java_awt_Toolkit_evtRegisterSource ( JNIEnv* env UNUSED, jclass clazz UNUSED, Window wnd )
{
/*
* We have done that already during the various wndCreateXX()
@@ -937,7 +938,7 @@
jint
-Java_java_awt_Toolkit_evtUnregisterSource ( JNIEnv* env, jclass clazz, Window wnd )
+Java_java_awt_Toolkit_evtUnregisterSource ( JNIEnv* env UNUSED, jclass clazz UNUSED, Window wnd )
{
int i = getSourceIdx( X, wnd);
More information about the kaffe
mailing list