prims.cc (unblock_signal): Annotate signum with __unused__ to avoid warnings in the...
authorPer Bothner <per@bothner.com>
Sun, 26 Sep 2004 20:38:49 +0000 (13:38 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Sun, 26 Sep 2004 20:38:49 +0000 (13:38 -0700)
* prims.cc (unblock_signal): Annotate signum with __unused__ to
avoid warnings in the non-POSIX_VERSION case.
Also, we only need this function if either HANDLE_SEGV or HANDLE_FPE,
so place it inside an #if block.
* include/default-signal.h (SIGNAL_HANDLER): Parameters are __unused__.
* include/i386-signal.h (SIGNAL_HANDLER):  Likewise
* include/mips-signal.h (SIGNAL_HANDLER):  Likewise
* include/sparc-signal.h (SIGNAL_HANDLER):  Likewise

From-SVN: r88148

libjava/ChangeLog
libjava/include/default-signal.h
libjava/include/i386-signal.h
libjava/include/mips-signal.h
libjava/include/sparc-signal.h
libjava/prims.cc

index 1901c4aae02917fa19521bebbbd20f2886bc8370..2794b78266f614de28345194a37c057d8fef5673 100644 (file)
@@ -1,3 +1,14 @@
+2004-09-26  Per Bothner  <per@bothner.com>
+
+       * prims.cc (unblock_signal): Annotate signum with __unused__ to
+       avoid warnings in the non-POSIX_VERSION case.
+       Also, we only need this function if either HANDLE_SEGV or HANDLE_FPE,
+       so place it inside an #if block.
+       * include/default-signal.h (SIGNAL_HANDLER): Parameters are __unused__.
+       * include/i386-signal.h (SIGNAL_HANDLER):  Likewise
+       * include/mips-signal.h (SIGNAL_HANDLER):  Likewise
+       * include/sparc-signal.h (SIGNAL_HANDLER):  Likewise
+
 2004-09-26  Per Bothner  <per@bothner.com>
 
        * prims.cc (process_gcj_properties):  Optimization.
index 1c50f5f7ec3a96e088f7c4265bfc841c56e46288..6aea73468f52dc7ab3e3980e35e9f97ae8a79315 100644 (file)
@@ -19,7 +19,7 @@ details.  */
 #include <signal.h>
 
 #define SIGNAL_HANDLER(_name)                  \
-static void _name (int _dummy)
+static void _name (int _dummy __attribute__ ((__unused__)))
 
 #define INIT_SEGV                                              \
 do                                                             \
index 81959725c062d6101996ff5c3c511342e2438eed..f7b0edae6225332fbfa0e74a8dc800f773bf23b0 100644 (file)
@@ -20,7 +20,7 @@ details.  */
 #define HANDLE_FPE 1
 
 #define SIGNAL_HANDLER(_name)  \
-static void _name (int _dummy)
+static void _name (int _dummy __attribute__ ((__unused__)))
 
 #define MAKE_THROW_FRAME(_exception)                                   \
 do                                                                     \
index 0f77e475dd228d92679948f35e66213da459e9fd..732ba0b1f677003fe555c958314441bcfd3ff039 100644 (file)
@@ -54,7 +54,9 @@ struct kernel_sigaction {
 
 
 #define SIGNAL_HANDLER(_name) \
-static void _name (int _dummy, siginfo_t *_info, sig_ucontext_t *_arg)
+static void _name (int _dummy __attribute__ ((__unused__)), \
+                  siginfo_t *_info __attribute__ ((__unused__)), \
+                  sig_ucontext_t *_arg __attribute__ ((__unused__)))
 
 /*
  *  MIPS leaves pc pointing at the faulting instruction, but the
index 1676d26396b5134a46cbdba7b6575f0de8d6d035..eb7f2b39d953c654a6db4aa03da666745fe9fa90 100644 (file)
@@ -18,7 +18,9 @@ details.  */
 #define HANDLE_FPE 1
 
 #define SIGNAL_HANDLER(_name)                                          \
-static void _name (int _dummy, siginfo_t *_info, void *arg)
+static void _name (int _dummy __attribute__ ((__unused__)), \
+                  siginfo_t *_info __attribute__ ((__unused__)), \
+                  void *arg __attribute__ ((__unused__)))
 
 #ifdef __arch64__
 #define FLUSH_REGISTER_WINDOWS                                 \
index 7511906b19a7244f714911174191cd6a1515febe..70ede2765cbe2118acab3e1a0991b9e900435b87 100644 (file)
@@ -125,10 +125,11 @@ void (*_Jv_JVMPI_Notify_THREAD_END) (JVMPI_Event *event);
 #endif
 \f
 
+#if defined (HANDLE_SEGV) || defined(HANDLE_FPE)
 /* Unblock a signal.  Unless we do this, the signal may only be sent
    once.  */
 static void 
-unblock_signal (int signum)
+unblock_signal (int signum __attribute__ ((__unused__)))
 {
 #ifdef _POSIX_VERSION
   sigset_t sigs;
@@ -138,6 +139,7 @@ unblock_signal (int signum)
   sigprocmask (SIG_UNBLOCK, &sigs, NULL);
 #endif
 }
+#endif
 
 #ifdef HANDLE_SEGV
 SIGNAL_HANDLER (catch_segv)