Patch [libf2c]: fix unused parameter warnings

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Tue Jun 4 18:20:00 GMT 2002


Fixes:
libI77/rsli.c:29: warning: unused parameter `ch'
libI77/rsli.c:29: warning: unused parameter `f'
libF77/i_len.c:4: warning: unused parameter `s'
libF77/h_len.c:4: warning: unused parameter `s'
libU77/vxttime_.c:43: warning: unused parameter `Lchtime'
libU77/vxtidate_.c:57: warning: unused parameter `m'
libU77/vxtidate_.c:57: warning: unused parameter `d'
libU77/vxtidate_.c:57: warning: unused parameter `y'
libU77/fputc_.c:30: warning: unused parameter `Lc'
libU77/date_.c:49: warning: unused parameter `buf'
libU77/date_.c:49: warning: unused parameter `buf_len'
f2cext.c:143: warning: unused parameter `status'

Tested on solaris2.7, ok to install?

		Thanks,
		--Kaveh


2002-06-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* f2cext.c (alarm_): Mark parameter(s) with attribute `unused'.
	* libF77/h_len.c (h_len): Likewise.
	* libF77/i_len.c (i_len): Likewise.
	* libI77/rsli.c (i_ungetc): Likewise.
	* libU77/date_.c (G77_date_y2kbuggy_0): Likewise.
	* libU77/fputc_.c (G77_fputc_0): Likewise.
	* libU77/vxtidate_.c (G77_vxtidate_y2kbuggy_0): Likewise.
	* libU77/vxttime_.c (G77_vxttime_0): Likewise.

diff -rup orig/egcc-CVS20020603/libf2c/f2cext.c egcc-CVS20020603/libf2c/f2cext.c
--- orig/egcc-CVS20020603/libf2c/f2cext.c	1999-03-05 18:40:08.000000000 -0500
+++ egcc-CVS20020603/libf2c/f2cext.c	2002-06-04 17:24:40.240093022 -0400
@@ -140,7 +140,8 @@ integer access_ (const char *name, const
 #endif
 
 #ifdef Lalarm
-integer alarm_ (integer *seconds, sig_proc proc, integer *status) {
+integer alarm_ (integer *seconds, sig_proc proc,
+		integer *status __attribute__ ((__unused__))) {
     extern integer G77_alarm_0 (integer *seconds, sig_proc proc);
     return G77_alarm_0 (seconds, proc);
 }
diff -rup orig/egcc-CVS20020603/libf2c/libF77/h_len.c egcc-CVS20020603/libf2c/libF77/h_len.c
--- orig/egcc-CVS20020603/libf2c/libF77/h_len.c	2002-06-01 08:31:48.000000000 -0400
+++ egcc-CVS20020603/libf2c/libF77/h_len.c	2002-06-04 21:13:32.881305199 -0400
@@ -1,7 +1,7 @@
 #include "f2c.h"
 
 shortint
-h_len (char *s, ftnlen n)
+h_len (char *s __attribute__ ((__unused__)), ftnlen n)
 {
   return (n);
 }
diff -rup orig/egcc-CVS20020603/libf2c/libF77/i_len.c egcc-CVS20020603/libf2c/libF77/i_len.c
--- orig/egcc-CVS20020603/libf2c/libF77/i_len.c	2002-06-01 08:31:49.000000000 -0400
+++ egcc-CVS20020603/libf2c/libF77/i_len.c	2002-06-04 21:16:40.882296558 -0400
@@ -1,7 +1,7 @@
 #include "f2c.h"
 
 integer
-i_len (char *s, ftnlen n)
+i_len (char *s __attribute__ ((__unused__)), ftnlen n)
 {
   return (n);
 }
diff -rup orig/egcc-CVS20020603/libf2c/libI77/rsli.c egcc-CVS20020603/libf2c/libI77/rsli.c
--- orig/egcc-CVS20020603/libf2c/libI77/rsli.c	2002-06-01 08:31:53.000000000 -0400
+++ egcc-CVS20020603/libf2c/libI77/rsli.c	2002-06-04 17:24:40.250094220 -0400
@@ -26,7 +26,8 @@ i_getc (void)
 }
 
 static int
-i_ungetc (int ch, FILE * f)
+i_ungetc (int ch __attribute__ ((__unused__)),
+	  FILE * f __attribute__ ((__unused__)))
 {
   if (--f__recpos == f__svic->icirlen)
     return '\n';
diff -rup orig/egcc-CVS20020603/libf2c/libU77/date_.c egcc-CVS20020603/libf2c/libU77/date_.c
--- orig/egcc-CVS20020603/libf2c/libU77/date_.c	2002-06-01 08:31:54.000000000 -0400
+++ egcc-CVS20020603/libf2c/libU77/date_.c	2002-06-04 17:24:40.250094220 -0400
@@ -46,7 +46,8 @@ const char *G77_Non_Y2K_Compliance_Messa
   "Call to non Y2K compliant subroutine detected.";
 
 int
-G77_date_y2kbuggy_0 (char *buf, ftnlen buf_len)
+G77_date_y2kbuggy_0 (char *buf __attribute__ ((__unused__)),
+		     ftnlen buf_len __attribute__ ((__unused__)))
 {
   extern int G77_abort_0 ();
   fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message);
diff -rup orig/egcc-CVS20020603/libf2c/libU77/fputc_.c egcc-CVS20020603/libf2c/libU77/fputc_.c
--- orig/egcc-CVS20020603/libf2c/libU77/fputc_.c	2002-06-01 08:31:54.000000000 -0400
+++ egcc-CVS20020603/libf2c/libU77/fputc_.c	2002-06-04 17:24:40.250094220 -0400
@@ -27,7 +27,8 @@ Boston, MA 02111-1307, USA.  */
 #include "fio.h"
 
 integer
-G77_fputc_0 (const integer * lunit, const char *c, const ftnlen Lc)
+G77_fputc_0 (const integer * lunit, const char *c,
+	     const ftnlen Lc __attribute__ ((__unused__)))
 {
   int err;
   FILE *f = f__units[*lunit].ufd;
diff -rup orig/egcc-CVS20020603/libf2c/libU77/vxtidate_.c egcc-CVS20020603/libf2c/libU77/vxtidate_.c
--- orig/egcc-CVS20020603/libf2c/libU77/vxtidate_.c	2002-06-01 08:31:56.000000000 -0400
+++ egcc-CVS20020603/libf2c/libU77/vxtidate_.c	2002-06-04 17:24:40.250094220 -0400
@@ -54,7 +54,9 @@ G77_vxtidate_y2kbug_0 (integer * m, inte
 #ifdef PIC
 extern const char *G77_Non_Y2K_Compliance_Message;
 int
-G77_vxtidate_y2kbuggy_0 (integer * m, integer * d, integer * y)
+G77_vxtidate_y2kbuggy_0 (integer * m __attribute__ ((__unused__)),
+			 integer * d __attribute__ ((__unused__)),
+			 integer * y __attribute__ ((__unused__)))
 {
   extern int G77_abort_0 ();
   fprintf (stderr, "%s\n", G77_Non_Y2K_Compliance_Message);
diff -rup orig/egcc-CVS20020603/libf2c/libU77/vxttime_.c egcc-CVS20020603/libf2c/libU77/vxttime_.c
--- orig/egcc-CVS20020603/libf2c/libU77/vxttime_.c	2002-06-01 08:31:56.000000000 -0400
+++ egcc-CVS20020603/libf2c/libU77/vxttime_.c	2002-06-04 17:24:40.250094220 -0400
@@ -40,7 +40,8 @@ Boston, MA 02111-1307, USA.  */
 
 /* Subroutine */
 void
-G77_vxttime_0 (char chtime[8], const ftnlen Lchtime)
+G77_vxttime_0 (char chtime[8],
+	       const ftnlen Lchtime __attribute__ ((__unused__)))
 {
   time_t tim;
   char *ctim;



More information about the Gcc-patches mailing list