This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libgfortran,committed] Get rid of warning in io/unix.c
- From: FX Coudert <fxcoudert at gmail dot com>
- To: "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 27 Jul 2007 17:42:41 +0100
- Subject: [libgfortran,committed] Get rid of warning in io/unix.c
On platforms missing ttyname(), the argument to stream_ttyname() is
unused, leading to a warning. I've thus committed the following patch
as rev. 126983, after checking that it doesn't break build on i686-
linux.
FX
Index: ChangeLog
===================================================================
--- ChangeLog (revision 126982)
+++ ChangeLog (working copy)
@@ -1,5 +1,9 @@
2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+ * io/unix.c (stream_ttyname): Mark argument as potentialy
unused.
+
+2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
PR fortran/32035
* runtime/select.c (select_string): Adjust prototype and
function
so that the return value is an integer, not a pointer.
Index: io/unix.c
===================================================================
--- io/unix.c (revision 126982)
+++ io/unix.c (working copy)
@@ -1945,7 +1945,7 @@ stream_isatty (stream *s)
}
char *
-stream_ttyname (stream *s)
+stream_ttyname (stream *s __attribute__ ((unused)))
{
#ifdef HAVE_TTYNAME
return ttyname (((unix_stream *) s)->fd);