ruby-changes:5370
From: nobu <ko1@a...>
Date: Sat, 7 Jun 2008 21:38:18 +0900 (JST)
Subject: [ruby-changes:5370] Ruby:r16873 (trunk): * io.c (rb_f_open), re.c (rb_reg_search), transcode.c (str_transcode):
nobu 2008-06-07 21:38:03 +0900 (Sat, 07 Jun 2008)
New Revision: 16873
Modified files:
trunk/ChangeLog
trunk/io.c
trunk/re.c
trunk/transcode.c
trunk/util.c
Log:
* io.c (rb_f_open), re.c (rb_reg_search), transcode.c (str_transcode):
suppress warnings.
* util.c (quorem, rv_alloc, nrv_alloc): only used in dtoa().
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16873&r2=16872&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/transcode.c?r1=16873&r2=16872&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/io.c?r1=16873&r2=16872&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/util.c?r1=16873&r2=16872&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/re.c?r1=16873&r2=16872&diff_format=u
Index: re.c
===================================================================
--- re.c (revision 16872)
+++ re.c (revision 16873)
@@ -1279,7 +1279,7 @@
{
int result;
VALUE match;
- struct re_registers *regs, regi;
+ struct re_registers regi, *regs = ®i;
char *range = RSTRING_PTR(str);
regex_t *reg0 = RREGEXP(re)->ptr, *reg;
int busy = FL_TEST(re, REG_BUSY);
@@ -1301,7 +1301,6 @@
}
}
if (NIL_P(match)) {
- regs = ®i;
MEMZERO(regs, struct re_registers, 1);
}
FL_SET(re, REG_BUSY);
Index: ChangeLog
===================================================================
--- ChangeLog (revision 16872)
+++ ChangeLog (revision 16873)
@@ -1,3 +1,10 @@
+Sat Jun 7 21:37:58 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * io.c (rb_f_open), re.c (rb_reg_search), transcode.c (str_transcode):
+ suppress warnings.
+
+ * util.c (quorem, rv_alloc, nrv_alloc): only used in dtoa().
+
Sat Jun 7 16:06:14 2008 Nobuyoshi Nakada <nobu@r...>
* configure.in (CFLAGS, CXXFLAGS): append default flags.
Index: io.c
===================================================================
--- io.c (revision 16872)
+++ io.c (revision 16873)
@@ -4215,7 +4215,7 @@
static VALUE
rb_f_open(int argc, VALUE *argv)
{
- ID to_open;
+ ID to_open = 0;
int redirect = Qfalse;
if (argc >= 1) {
Index: util.c
===================================================================
--- util.c (revision 16872)
+++ util.c (revision 16873)
@@ -3067,6 +3067,7 @@
return sign ? -dval(rv) : dval(rv);
}
+#if 0 /* unused right now */
static int
quorem(Bigint *b, Bigint *S)
{
@@ -3177,11 +3178,13 @@
}
return q;
}
+#endif
#ifndef MULTIPLE_THREADS
static char *dtoa_result;
#endif
+#if 0 /* unused right now */
static char *
rv_alloc(int i)
{
@@ -3212,6 +3215,7 @@
*rve = t;
return rv;
}
+#endif
/* freedtoa(s) must be used to free values s returned by dtoa
* when MULTIPLE_THREADS is #defined. It should be used in all cases,
Index: transcode.c
===================================================================
--- transcode.c (revision 16872)
+++ transcode.c (revision 16873)
@@ -309,7 +309,7 @@
return -1;
}
- while (!final_encoding) { /* loop for multistep transcoding */
+ do { /* loop for multistep transcoding */
/* later, maybe use smaller intermediate strings for very long strings */
if (!(my_transcoder = transcode_dispatch(from_e, to_e))) {
rb_raise(rb_eArgError, "transcoding not supported (from %s to %s)", from_e, to_e);
@@ -372,7 +372,7 @@
from_e = my_transcoder->to_encoding;
str = dest;
}
- }
+ } while (!final_encoding);
/* set encoding */
if (!to_enc) {
to_encidx = rb_define_dummy_encoding(to_e);
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/