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

ruby-changes:43734

From: nobu <ko1@a...>
Date: Wed, 3 Aug 2016 15:03:54 +0900 (JST)
Subject: [ruby-changes:43734] nobu:r55807 (trunk): object.c: suppress warning

nobu	2016-08-03 15:03:50 +0900 (Wed, 03 Aug 2016)

  New Revision: 55807

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55807

  Log:
    object.c: suppress warning
    
    * object.c (rb_obj_clone2): remove set but not used variable to
      suppress unused-but-set-variable warning.

  Modified files:
    trunk/object.c
Index: object.c
===================================================================
--- object.c	(revision 55806)
+++ object.c	(revision 55807)
@@ -331,12 +331,11 @@ rb_obj_clone2(int argc, VALUE *argv, VAL https://github.com/ruby/ruby/blob/trunk/object.c#L331
     VALUE clone;
     VALUE singleton;
     VALUE kwfreeze = Qtrue;
-    int n;
 
     if (!keyword_ids[0]) {
 	CONST_ID(keyword_ids[0], "freeze");
     }
-    n = rb_scan_args(argc, argv, "0:", &opt);
+    rb_scan_args(argc, argv, "0:", &opt);
     if (!NIL_P(opt)) {
 	rb_get_kwargs(opt, keyword_ids, 0, 1, kwargs);
 	kwfreeze = kwargs[0];

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

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