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

ruby-changes:33763

From: nobu <ko1@a...>
Date: Tue, 6 May 2014 23:28:42 +0900 (JST)
Subject: [ruby-changes:33763] nobu:r45844 (trunk): parse.y: unused return values

nobu	2014-05-06 23:28:38 +0900 (Tue, 06 May 2014)

  New Revision: 45844

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

  Log:
    parse.y: unused return values
    
    * parse.y (arg_var_gen, local_var_gen): make void since the result
      values are not used.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 45843)
+++ parse.y	(revision 45844)
@@ -508,9 +508,9 @@ static void local_push_gen(struct parser https://github.com/ruby/ruby/blob/trunk/parse.y#L508
 #define local_push(top) local_push_gen(parser,(top))
 static void local_pop_gen(struct parser_params*);
 #define local_pop() local_pop_gen(parser)
-static int local_var_gen(struct parser_params*, ID);
+static void local_var_gen(struct parser_params*, ID);
 #define local_var(id) local_var_gen(parser, (id))
-static int arg_var_gen(struct parser_params*, ID);
+static void arg_var_gen(struct parser_params*, ID);
 #define arg_var(id) arg_var_gen(parser, (id))
 static int  local_id_gen(struct parser_params*, ID);
 #define local_id(id) local_id_gen(parser, (id))
@@ -9744,21 +9744,19 @@ local_tbl_gen(struct parser_params *pars https://github.com/ruby/ruby/blob/trunk/parse.y#L9744
 }
 #endif
 
-static int
+static void
 arg_var_gen(struct parser_params *parser, ID id)
 {
     vtable_add(lvtbl->args, id);
-    return vtable_size(lvtbl->args) - 1;
 }
 
-static int
+static void
 local_var_gen(struct parser_params *parser, ID id)
 {
     vtable_add(lvtbl->vars, id);
     if (lvtbl->used) {
 	vtable_add(lvtbl->used, (ID)ruby_sourceline);
     }
-    return vtable_size(lvtbl->vars) - 1;
 }
 
 static int

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

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