[PATCH, fortran]: fix a few more libgfortran warnings
Ben Elliston
bje@au1.ibm.com
Thu Oct 18 23:51:00 GMT 2007
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)
More information about the Fortran
mailing list