[kaffe] CVS kaffe (doogie): Add UNUSED annotation to several parameters.

Kaffe CVS cvs-commits at kaffe.org
Fri Dec 10 20:10:44 PST 2004


PatchSet 5610 
Date: 2004/12/11 04:01:01
Author: doogie
Branch: HEAD
Tag: (none) 
Log:
Add UNUSED annotation to several parameters.

Members: 
	ChangeLog:1.3155->1.3156 
	kaffe/kaffevm/systems/unix-pthreads/signal.c:1.13->1.14 
	kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.58->1.59 
	libraries/clib/management/Debug.c:1.6->1.7 
	libraries/clib/management/XProfiler.c:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3155 kaffe/ChangeLog:1.3156
--- kaffe/ChangeLog:1.3155	Sat Dec 11 03:59:51 2004
+++ kaffe/ChangeLog	Sat Dec 11 04:01:01 2004
@@ -1,5 +1,13 @@
 2004-12-10  Adam Heath  <doogie at brainfood.com>
 
+	* kaffe/kaffevm/systems/unix-pthreads/signal.c,
+	  kaffe/kaffevm/systems/unix-pthreads/thread-impl.c,
+	  libraries/clib/management/Debug.c,
+	  libraries/clib/management/XProfiler.c:
+	  Add UNUSED annotation to several parameters.
+
+2004-12-10  Adam Heath  <doogie at brainfood.com>
+
 	* config/i386/jit3-i386.def, kaffe/kaffevm/jit3/basecode.c,
 	  libraries/clib/native/Runtime.c:
 	  Add NONRETURNING annotation.
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.13 kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.14
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c:1.13	Mon Aug  2 10:45:05 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/signal.c	Sat Dec 11 04:01:01 2004
@@ -235,29 +235,37 @@
  * Restore an asynchronous signal handler.  
  * Only necesary on some platforms which don't provide SIGACTION
  */
+#if defined(HAVE_SIGACTION)
+void
+restoreAsyncSignalHandler(int sig UNUSED, void* handler UNUSED)
+{
+}
+#else
 void
 restoreAsyncSignalHandler(int sig, void* handler)
 {
-#if !defined(HAVE_SIGACTION)
 	/* XXX need a configure-time test for this. */
 	registerAsyncSignalHandler(sig, handler);
-#endif
 }
-
+#endif
 
 /*
  * Restore a synchronous signal handler.  
  * Only necesary on some platforms.
  */
+#if defined(HAVE_SIGACTION)
+void
+restoreSyncSignalHandler(int sig UNUSED, void* handler UNUSED)
+{
+}
+#else
 void
 restoreSyncSignalHandler(int sig, void* handler)
 {
-#if !defined(HAVE_SIGACTION)
 	/* XXX need a configure-time test for this. */
 	registerSyncSignalHandler(sig, handler);
-#endif
 }
-
+#endif
 
 /*
  * Register a handler for a terminal (i.e., process-killing) signal.
Index: kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c
diff -u kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.58 kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.59
--- kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.58	Fri Dec 10 20:54:39 2004
+++ kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c	Sat Dec 11 04:01:01 2004
@@ -1120,10 +1120,10 @@
  * Change the scheduler priority of a running thread. Since we aren't
  * called directly, we can assume that 'prio' is within [MIN_PRIORITY..MAX_PRIORITY]
  */
+#if defined(SCHEDUL_POLICY)
 void
 jthread_setpriority (jthread_t cur, jint prio)
 {
-#if defined(SCHEDUL_POLICY)
   struct sched_param   sp;
 
   if ( cur ) {
@@ -1133,8 +1133,13 @@
 			      cur, cur->tid, cur->data.jlThread, prio, priorities[prio]))
 	pthread_setschedparam( cur->tid, SCHEDULE_POLICY, &sp);
   }
-#endif
 }
+#else
+void
+jthread_setpriority (jthread_t cur UNUSED, jint prio UNUSED)
+{
+}
+#endif
 
 /*******************************************************************************
  * the suspend/resume mechanism
Index: kaffe/libraries/clib/management/Debug.c
diff -u kaffe/libraries/clib/management/Debug.c:1.6 kaffe/libraries/clib/management/Debug.c:1.7
--- kaffe/libraries/clib/management/Debug.c:1.6	Mon Jul  5 16:40:52 2004
+++ kaffe/libraries/clib/management/Debug.c	Sat Dec 11 04:01:02 2004
@@ -40,11 +40,11 @@
 	Kaffe_JavaVMArgs.enableVerboseCall = level;
 }
 
+#ifdef KAFFE_STATS
 void
 Java_kaffe_management_Debug_enableStats
 	(JNIEnv *env, jclass thisClass UNUSED, jobject list)
 {
-#ifdef KAFFE_STATS
 	static char *curStats;	/* kaffe expects this string to be
 				 * around at exit.
 				 */
@@ -56,8 +56,13 @@
 	strcpy(curStats, real_list);
 	statsSetMaskStr(curStats);
 	(*env)->ReleaseStringUTFChars(env, list, real_list);
+}
 #else
+void
+Java_kaffe_management_Debug_enableStats
+	(JNIEnv *env UNUSED, jclass thisClass UNUSED, jobject list UNUSED)
+{
 	fputs("Kaffe is not configured for stats\n", stderr);
-#endif
 }
+#endif
 
Index: kaffe/libraries/clib/management/XProfiler.c
diff -u kaffe/libraries/clib/management/XProfiler.c:1.4 kaffe/libraries/clib/management/XProfiler.c:1.5
--- kaffe/libraries/clib/management/XProfiler.c:1.4	Tue Oct 12 02:00:23 2004
+++ kaffe/libraries/clib/management/XProfiler.c	Sat Dec 11 04:01:02 2004
@@ -34,13 +34,18 @@
 #endif
 }
 
+#if defined(KAFFE_XPROFILER)
 void Java_kaffe_management_XProfiler_stage(JNIEnv *env UNUSED, jclass clazz UNUSED,
 					   jstring _stage_name)
 {
-#if defined(KAFFE_XPROFILER)
 	char *stage_name = stringJava2C(_stage_name);
 
 	xProfileStage(stage_name);
 	gc_free(stage_name);
-#endif
 }
+#else
+void Java_kaffe_management_XProfiler_stage(JNIEnv *env UNUSED, jclass clazz UNUSED,
+					   jstring _stage_name UNUSED)
+{
+}
+#endif




More information about the kaffe mailing list