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

Kaffe CVS cvs-commits at kaffe.org
Wed Jan 7 12:11:02 PST 2004


PatchSet 4290 
Date: 2004/01/07 20:07:39
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed compiler warning on sparc-solaris

2004-01-07  Dalibor Topic <robilad at kaffe.org>

        * kaffe/kaffevm/systems/unix-jthreads/signal.c
        (registerSyncSignalHandler): Only define variable validSig
        if NDEBUG is not defined.
        Fixes a compiler warning on sparc-solaris.

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

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

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1877 kaffe/ChangeLog:1.1878
--- kaffe/ChangeLog:1.1877	Wed Jan  7 19:51:57 2004
+++ kaffe/ChangeLog	Wed Jan  7 20:07:39 2004
@@ -1,4 +1,14 @@
 2004-01-07  Dalibor Topic <robilad at kaffe.org>
+
+	* kaffe/kaffevm/systems/unix-jthreads/signal.c
+	(registerSyncSignalHandler): Only define variable validSig
+	if NDEBUG is not defined.
+        Fixes a compiler warning on sparc-solaris.
+
+        Reported by: Riccardo Mottola <zuse at libero.it>
+
+2004-01-07  Dalibor Topic <robilad at kaffe.org>
+
 	* kaffe/kaffevm/systems/unix-jthreads/signal.c
 	(registerAsyncSignalHandler): Only define variable validSig
 	if NDEBUG is not defined.
Index: kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c
diff -u kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.11 kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.12
--- kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c:1.11	Wed Jan  7 19:51:58 2004
+++ kaffe/kaffe/kaffevm/systems/unix-jthreads/signal.c	Wed Jan  7 20:07:40 2004
@@ -186,17 +186,21 @@
 void
 registerSyncSignalHandler(int sig, void* handler)
 {
+#if !defined(NDEBUG)
+        /* Only used in assert. */
+
 	int validSig = 0
 #if defined(SIGFPE)	       
 		|| (sig == SIGFPE)
-#endif
+#endif /* defined(SIGFPE) */
 #if defined(SIGSEGV)
 		|| (sig == SIGSEGV)
-#endif
+#endif /* defined(SIGSEGV) */
 #if defined(SIGBUS)
 		|| (sig == SIGBUS)
-#endif
+#endif /* defined(SIGBUS) */
 		;
+#endif /* !defined(NDEBUG) */
 	
 	assert(handler != NULL);
 	assert(validSig);




More information about the kaffe mailing list