This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, fortran]: fix a few more libgfortran warnings


This patch eliminates some warnings in intrinsics/signal.c due to some
function parameters being unused depending on how the functions are
compiled -- ie. in the absence of SIGALRM, alarm() and signal() on the
target.

Okay for mainline?

2007-10-19  Ben Elliston  <bje@au.ibm.com>

        * intrinsics/signal.c (alarm_sub_i4): Mark conditionally unused
        parameters with __attribute__ ((unused)).
        (alarm_sub_i8): Likewise.
        (alarm_sub_int_i4): Likewise.
        (alarm_sub_int_i8): Likewise.

Index: intrinsics/signal.c
===================================================================
--- intrinsics/signal.c (revision 129465)
+++ intrinsics/signal.c (working copy)
@@ -136,7 +136,9 @@ extern void alarm_sub_i4 (int *, void (*
 iexport_proto(alarm_sub_i4);
 
 void
-alarm_sub_i4 (int *seconds, void (*handler)(int), GFC_INTEGER_4 *status)
+alarm_sub_i4 (int * seconds __attribute__ ((unused)),
+             void (*handler)(int) __attribute__ ((unused)),
+             GFC_INTEGER_4 *status)
 {
 #if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL)
   if (status != NULL)
@@ -164,7 +166,9 @@ extern void alarm_sub_i8 (int *, void (*
 iexport_proto(alarm_sub_i8);
 
 void
-alarm_sub_i8 (int *seconds, void (*handler)(int), GFC_INTEGER_8 *status)
+alarm_sub_i8 (int *seconds __attribute__ ((unused)),
+             void (*handler)(int) __attribute__ ((unused)),
+             GFC_INTEGER_8 *status)
 {
 #if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL)
   if (status != NULL)
@@ -193,7 +197,9 @@ extern void alarm_sub_int_i4 (int *, int
 iexport_proto(alarm_sub_int_i4);
 
 void
-alarm_sub_int_i4 (int *seconds, int *handler, GFC_INTEGER_4 *status)
+alarm_sub_int_i4 (int *seconds __attribute__ ((unused)),
+                 int *handler __attribute__ ((unused)),
+                 GFC_INTEGER_4 *status)
 {
 #if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL)
   if (status != NULL)
@@ -221,7 +227,9 @@ extern void alarm_sub_int_i8 (int *, int
 iexport_proto(alarm_sub_int_i8);
 
 void
-alarm_sub_int_i8 (int *seconds, int *handler, GFC_INTEGER_8 *status)
+alarm_sub_int_i8 (int *seconds __attribute__ ((unused)),
+                 int *handler __attribute__ ((unused)),
+                 GFC_INTEGER_8 *status)
 {
 #if defined (SIGALRM) && defined (HAVE_ALARM) && defined (HAVE_SIGNAL)
   if (status != NULL)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]