[前][次][番号順一覧][スレッド一覧]

ruby-changes:27726

From: nobu <ko1@a...>
Date: Sat, 16 Mar 2013 17:05:54 +0900 (JST)
Subject: [ruby-changes:27726] nobu:r39778 (trunk): console.c: supppress warnings

nobu	2013-03-16 17:05:45 +0900 (Sat, 16 Mar 2013)

  New Revision: 39778

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39778

  Log:
    console.c: supppress warnings
    
    * ext/io/console/console.c (console_iflush, console_oflush): supppress
      unused-but-set-variable warnings on no tcflush.

  Modified files:
    trunk/ext/io/console/console.c

Index: ext/io/console/console.c
===================================================================
--- ext/io/console/console.c	(revision 39777)
+++ ext/io/console/console.c	(revision 39778)
@@ -610,6 +610,7 @@ console_iflush(VALUE io) https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L610
 #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
     if (tcflush(fd, TCIFLUSH)) rb_sys_fail(0);
 #endif
+    (void)fd;
     return io;
 }
 
@@ -632,6 +633,7 @@ console_oflush(VALUE io) https://github.com/ruby/ruby/blob/trunk/ext/io/console/console.c#L633
 #if defined HAVE_TERMIOS_H || defined HAVE_TERMIO_H
     if (tcflush(fd, TCOFLUSH)) rb_sys_fail(0);
 #endif
+    (void)fd;
     return io;
 }
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]