[kaffe] CVS kaffe (dalibor): Fixed compiler warning on sparc-solaris

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Wed Jan 7 11:55:03 2004


PatchSet 4289 
Date: 2004/01/07 19:51:57
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed compiler warning on sparc-solaris

2004-01-07  Dalibor Topic <robilad@kaffe.org>
        * kaffe/kaffevm/systems/unix-jthreads/signal.c
        (registerAsyncSignalHandler): Only define variable validSig
        if NDEBUG is not defined.
        Fixes a compiler warning on sparc-solaris.

        Reported by: Riccardo Mottola <zuse@libero.it>

Members: 
	ChangeLog:1.1876->1.1877 
	kaffe/kaffevm/systems/unix-jthreads/signal.c:1.10->1.11 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1876 kaffe/ChangeLog:1.1877
--- kaffe/ChangeLog:1.1876	Wed Jan  7 19:00:59 2004
+++ kaffe/ChangeLog	Wed Jan  7 19:51:57 2004
@@ -1,4 +1,12 @@
 2004-01-07  Dalibor Topic <robilad@kaffe.org>
+	* kaffe/kaffevm/systems/unix-jthreads/signal.c
+	(registerAsyncSignalHandler): Only define variable validSig
+	if NDEBUG is not defined.
+        Fixes a compiler warning on sparc-solaris.
+
+        Reported by: Riccardo Mottola <zuse@libero.it>
+
+2004-01-07  Dalibor Topic <robilad@kaffe.org>
 
 	* include/jni.h
 	(JNINativeInterface): Changed GetPrimitiveArrayCritical 
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.10 kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.11
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.10	Mon Sep 11 00:58:18 2000
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c	Wed Jan  7 19:51:58 2004
@@ -156,14 +156,18 @@
 void
 registerAsyncSignalHandler(int sig, void* handler)
 {
+#if !defined(NDEBUG)
+	/* Only used in assert. */
+
 	int validSig = 
 		(sig == SIGALRM)
 #if defined(SIGVTALRM)
 		|| (sig == SIGVTALRM) 
-#endif
+#endif /* defined(SIGVTALRM) */
 		|| (sig == SIGIO)
 		|| (sig == SIGUSR1)
 		|| (sig == SIGCHLD);
+#endif /* !defined(NDEBUG) */
 
 	/* Make sure its really an asynchronous signal being registered. */
 	assert(handler != NULL);