* 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().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-06-07 12:38:03 +00:00
Родитель 126abc5c47
Коммит 0455e8ea9a
5 изменённых файлов: 15 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Sat Jun 7 21:37:58 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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@ruby-lang.org>
* configure.in (CFLAGS, CXXFLAGS): append default flags.

2
io.c
Просмотреть файл

@ -4215,7 +4215,7 @@ rb_io_s_sysopen(int argc, VALUE *argv)
static VALUE
rb_f_open(int argc, VALUE *argv)
{
ID to_open;
ID to_open = 0;
int redirect = Qfalse;
if (argc >= 1) {

3
re.c
Просмотреть файл

@ -1279,7 +1279,7 @@ rb_reg_search(VALUE re, VALUE str, int pos, int reverse)
{
int result;
VALUE match;
struct re_registers *regs, regi;
struct re_registers regi, *regs = &regi;
char *range = RSTRING_PTR(str);
regex_t *reg0 = RREGEXP(re)->ptr, *reg;
int busy = FL_TEST(re, REG_BUSY);
@ -1301,7 +1301,6 @@ rb_reg_search(VALUE re, VALUE str, int pos, int reverse)
}
}
if (NIL_P(match)) {
regs = &regi;
MEMZERO(regs, struct re_registers, 1);
}
FL_SET(re, REG_BUSY);

Просмотреть файл

@ -309,7 +309,7 @@ str_transcode(int argc, VALUE *argv, VALUE *self)
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 @@ str_transcode(int argc, VALUE *argv, VALUE *self)
from_e = my_transcoder->to_encoding;
str = dest;
}
}
} while (!final_encoding);
/* set encoding */
if (!to_enc) {
to_encidx = rb_define_dummy_encoding(to_e);

4
util.c
Просмотреть файл

@ -3067,6 +3067,7 @@ ret:
return sign ? -dval(rv) : dval(rv);
}
#if 0 /* unused right now */
static int
quorem(Bigint *b, Bigint *S)
{
@ -3177,11 +3178,13 @@ quorem(Bigint *b, Bigint *S)
}
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 @@ nrv_alloc(const char *s, char **rve, int n)
*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,