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

ruby-changes:25796

From: kosaki <ko1@a...>
Date: Mon, 26 Nov 2012 17:15:43 +0900 (JST)
Subject: [ruby-changes:25796] kosaki:r37853 (trunk): * string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)

kosaki	2012-11-26 17:13:19 +0900 (Mon, 26 Nov 2012)

  New Revision: 37853

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

  Log:
    * string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
    (rb_str_enumerate_lines): suppress "may be used uninitialized in
      this function" warning.

  Modified files:
    trunk/ChangeLog
    trunk/string.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 37852)
+++ ChangeLog	(revision 37853)
@@ -1,3 +1,9 @@
+Mon Nov 26 17:10:04 2012  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* string.c (rb_str_enumerate_chars, rb_str_enumerate_codepoints)
+	(rb_str_enumerate_lines): suppress "may be used uninitialized in
+	  this function" warning.
+
 Mon Nov 26 17:00:12 2012  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* vm_core.h (rb_thread_struct): added 'in_trap' member for marking
Index: string.c
===================================================================
--- string.c	(revision 37852)
+++ string.c	(revision 37853)
@@ -6109,7 +6109,7 @@
     VALUE line;
     int n;
     VALUE orig = str;
-    VALUE ary;
+    VALUE UNINITIALIZED_VAR(ary);
 
     if (argc == 0) {
 	rs = rb_rs;
@@ -6396,7 +6396,7 @@
     long i, len, n;
     const char *ptr;
     rb_encoding *enc;
-    VALUE ary;
+    VALUE UNINITIALIZED_VAR(ary);
 
     if (rb_block_given_p()) {
 	if (wantarray) {
@@ -6494,7 +6494,7 @@
     unsigned int c;
     const char *ptr, *end;
     rb_encoding *enc;
-    VALUE ary;
+    VALUE UNINITIALIZED_VAR(ary);
 
     if (single_byte_optimizable(str))
 	return rb_str_enumerate_bytes(str, wantarray);

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

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