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

ruby-changes:26604

From: shugo <ko1@a...>
Date: Sat, 29 Dec 2012 21:54:52 +0900 (JST)
Subject: [ruby-changes:26604] shugo:r38655 (trunk): * ext/curses/curses.c (window_cury, window_curx, window_maxy,

shugo	2012-12-29 21:54:41 +0900 (Sat, 29 Dec 2012)

  New Revision: 38655

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

  Log:
    * ext/curses/curses.c (window_cury, window_curx, window_maxy,
      window_maxx, window_begy, window_begx): use RB_UNUSED_VAR()
      to suppress unused-but-set-variable warnings.

  Modified files:
    trunk/ChangeLog
    trunk/ext/curses/curses.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38654)
+++ ChangeLog	(revision 38655)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Dec 29 21:51:30 2012  Shugo Maeda  <shugo@r...>
+
+	* ext/curses/curses.c (window_cury, window_curx, window_maxy,
+	  window_maxx, window_begy, window_begx): use RB_UNUSED_VAR()
+	  to suppress unused-but-set-variable warnings.
+
 Sat Dec 29 16:45:00 2012  Zachary Scott  <zachary@z...>
 
 	* iseq.c (RubyVM::InstructionSequence): rdoc formatting
Index: ext/curses/curses.c
===================================================================
--- ext/curses/curses.c	(revision 38654)
+++ ext/curses/curses.c	(revision 38655)
@@ -1663,11 +1663,10 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ext/curses/curses.c#L1663
 window_cury(VALUE obj)
 {
     struct windata *winp;
-    int x, y;
+    int RB_UNUSED_VAR(x), y;
 
     GetWINDOW(obj, winp);
     getyx(winp->window, y, x);
-    (void)x;
     return INT2FIX(y);
 }
 
@@ -1680,11 +1679,10 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ext/curses/curses.c#L1679
 window_curx(VALUE obj)
 {
     struct windata *winp;
-    int x, y;
+    int x, RB_UNUSED_VAR(y);
 
     GetWINDOW(obj, winp);
     getyx(winp->window, y, x);
-    (void)y;
     return INT2FIX(x);
 }
 
@@ -1705,7 +1703,6 @@ window_maxy(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/curses/curses.c#L1703
     {
 	int x, y;
 	getmaxyx(winp->window, y, x);
-	(void)x;
 	return INT2FIX(y);
     }
 #else
@@ -1730,7 +1727,6 @@ window_maxx(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ext/curses/curses.c#L1727
     {
 	int x, y;
 	getmaxyx(winp->window, y, x);
-	(void)y;
 	return INT2FIX(x);
     }
 #else
@@ -1747,12 +1743,11 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ext/curses/curses.c#L1743
 window_begy(VALUE obj)
 {
     struct windata *winp;
-    int x, y;
+    int RB_UNUSED_VAR(x), y;
 
     GetWINDOW(obj, winp);
 #ifdef getbegyx
     getbegyx(winp->window, y, x);
-    (void)x;
 #else
     y = winp->window->_begy;
 #endif
@@ -1768,12 +1763,11 @@ static VALUE https://github.com/ruby/ruby/blob/trunk/ext/curses/curses.c#L1763
 window_begx(VALUE obj)
 {
     struct windata *winp;
-    int x, y;
+    int x, RB_UNUSED_VAR(y);
 
     GetWINDOW(obj, winp);
 #ifdef getbegyx
     getbegyx(winp->window, y, x);
-    (void)y;
 #else
     x = winp->window->_begx;
 #endif

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

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