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

ruby-changes:4567

From: ko1@a...
Date: Thu, 17 Apr 2008 22:23:06 +0900 (JST)
Subject: [ruby-changes:4567] mame - Ruby:r16061 (trunk): * enc/trans/utf_16_32.c (fun_so_to_utf_16be, fun_so_to_utf_16le): add

mame	2008-04-17 22:22:40 +0900 (Thu, 17 Apr 2008)

  New Revision: 16061

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
    trunk/enc/trans/utf_16_32.c
    trunk/ext/nkf/nkf.c
    trunk/ext/syck/rubyext.c
    trunk/io.c
    trunk/test/ruby/test_parse.rb

  Log:
    * enc/trans/utf_16_32.c (fun_so_to_utf_16be, fun_so_to_utf_16le): add
      parentheses to remove warnings of gcc.
    
    * io.c (rb_io_getc): remove unused variables.
    
    * compile.c (NODE_NEXT, NODE_REDO): remove unused labels.
    
    * ext/nkf/nkf.c (rb_nkf_convert): remove unused variables.
    
    * ext/syck/rubyext.c (syck_resolver_initialize,
      syck_resolver_detect_implicit, syck_emitter_emit): remove unused
      variables.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/enc/trans/utf_16_32.c?r1=16061&r2=16060&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/compile.c?r1=16061&r2=16060&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16061&r2=16060&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=16061&r2=16060&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/syck/rubyext.c?r1=16061&r2=16060&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ext/nkf/nkf.c?r1=16061&r2=16060&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_parse.rb?r1=16061&r2=16060&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16060)
+++ ChangeLog	(revision 16061)
@@ -1,3 +1,18 @@
+Thu Apr 17 22:20:52 2008  Yusuke Endoh  <mame@t...>
+
+	* enc/trans/utf_16_32.c (fun_so_to_utf_16be, fun_so_to_utf_16le): add
+	  parentheses to remove warnings of gcc.
+
+	* io.c (rb_io_getc): remove unused variables.
+
+	* compile.c (NODE_NEXT, NODE_REDO): remove unused labels.
+
+	* ext/nkf/nkf.c (rb_nkf_convert): remove unused variables.
+
+	* ext/syck/rubyext.c (syck_resolver_initialize,
+	  syck_resolver_detect_implicit, syck_emitter_emit): remove unused
+	  variables.
+
 Thu Apr 17 20:12:47 2008  Yusuke Endoh  <mame@t...>
 
 	* test/ruby/test_rubyoptions.rb (test_search): enable some assertions.
Index: enc/trans/utf_16_32.c
===================================================================
--- enc/trans/utf_16_32.c	(revision 16060)
+++ enc/trans/utf_16_32.c	(revision 16061)
@@ -45,12 +45,12 @@
         return 2;
     }
     else if ((s[0]&0xF0)==0xE0) {
-        o[0] = (s[0]<<4) | (s[1]>>2)^0x20;
+        o[0] = (s[0]<<4) | ((s[1]>>2)^0x20);
         o[1] = (s[1]<<6) | (s[2]^0x80);
         return 2;
     }
     else {
-        int w = (((s[0]&0x07)<<2) | (s[1]>>4)&0x03) - 1;
+        int w = (((s[0]&0x07)<<2) | ((s[1]>>4)&0x03)) - 1;
         o[0] = 0xD8 | (w>>2);
         o[1] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
         o[2] = 0xDC | ((s[2]>>2)&0x03);
@@ -106,7 +106,7 @@
         return 2;
     }
     else {
-        int w = (((s[0]&0x07)<<2) | (s[1]>>4)&0x03) - 1;
+        int w = (((s[0]&0x07)<<2) | ((s[1]>>4)&0x03)) - 1;
         o[1] = 0xD8 | (w>>2);
         o[0] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
         o[3] = 0xDC | ((s[2]>>2)&0x03);
Index: io.c
===================================================================
--- io.c	(revision 16060)
+++ io.c	(revision 16061)
@@ -2394,8 +2394,6 @@
 rb_io_getc(VALUE io)
 {
     rb_io_t *fptr;
-    int r, n;
-    VALUE str;
     rb_encoding *enc;
 
     GetOpenFile(io, fptr);
Index: compile.c
===================================================================
--- compile.c	(revision 16060)
+++ compile.c	(revision 16061)
@@ -3103,7 +3103,6 @@
 	}
 	else {
 	    rb_iseq_t *ip;
-	  next_by_throw:
 	    ip = iseq;
 	    while (ip) {
 		level = 0x8000;
@@ -3165,7 +3164,6 @@
 	else {
 	    rb_iseq_t *ip;
 	    unsigned long level;
-	  redo_by_throw:
 	    level = 0x8000 | 0x4000;
 	    ip = iseq;
 	    while (ip) {
Index: ext/nkf/nkf.c
===================================================================
--- ext/nkf/nkf.c	(revision 16060)
+++ ext/nkf/nkf.c	(revision 16061)
@@ -138,10 +138,6 @@
 static VALUE
 rb_nkf_convert(VALUE obj, VALUE opt, VALUE src)
 {
-    rb_encoding *to_enc;
-    const char *to_e;
-    int to_encidx;
-
     reinit();
     StringValue(opt);
     nkf_split_options(RSTRING_PTR(opt));
Index: ext/syck/rubyext.c
===================================================================
--- ext/syck/rubyext.c	(revision 16060)
+++ ext/syck/rubyext.c	(revision 16061)
@@ -884,7 +884,6 @@
 static VALUE
 syck_resolver_initialize(VALUE self)
 {
-    VALUE tags = rb_hash_new();
     rb_ivar_set(self, s_tags, rb_hash_new());
     return self;
 }
@@ -916,7 +915,6 @@
 VALUE
 syck_resolver_detect_implicit(VALUE self, VALUE val)
 {
-    char *type_id;
     return rb_str_new2( "" );
 }
 
@@ -1946,7 +1944,6 @@
 syck_emitter_emit(int argc, VALUE *argv, VALUE self)
 {
     VALUE oid, proc;
-    char *anchor_name;
     SyckEmitter *emitter;
     struct emitter_xtra *bonus;
     SYMID symple;
Index: test/ruby/test_parse.rb
===================================================================
--- test/ruby/test_parse.rb	(revision 16060)
+++ test/ruby/test_parse.rb	(revision 16061)
@@ -759,6 +759,8 @@
   end
 
   def test_void_expr_stmts_value
+    # This test checks if void contexts are warned correctly.
+    # Thus, warnings MUST NOT be suppressed.
     $VERBOSE = true
     x = 1
     assert_nil eval("x; nil")

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

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