This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran 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
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=inuuX0S8wQLFKwzMJccHh85tBYMJYVLJVmmpBGVjucH5U7Ym/Q25vJMY2MkLxt74iiE15jVKzsqfT0MiiOjqjbclO2hDPV5NqqhQ7Cooz10qfFUFqJ4JVObT8m7O5bYNe1s11vlBeeB2Z2KAP+lAXte+HpL3u1Ix8Y7ZuWWNnG4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=FYs+2QqWQX4Dbu5jZv90P2g/t0lmPLvl7k0eMpT+0o52nO2cjJgdriAj8iuScb2nnQzyb8+rtM1+6t/tOLVLlJGw32mYRwcTNjMhqpIulYAm3hKlLhtzAh4y6L0cBI3c8hj2E1vOKhVJTd9r9q3duSm3MdwXqzuOXy4FC7qvxU0=
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);