mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
126abc5c47
commit
0455e8ea9a
5 changed files with 15 additions and 5 deletions
|
@ -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>
|
Sat Jun 7 16:06:14 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in (CFLAGS, CXXFLAGS): append default flags.
|
* configure.in (CFLAGS, CXXFLAGS): append default flags.
|
||||||
|
|
2
io.c
2
io.c
|
@ -4215,7 +4215,7 @@ rb_io_s_sysopen(int argc, VALUE *argv)
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_f_open(int argc, VALUE *argv)
|
rb_f_open(int argc, VALUE *argv)
|
||||||
{
|
{
|
||||||
ID to_open;
|
ID to_open = 0;
|
||||||
int redirect = Qfalse;
|
int redirect = Qfalse;
|
||||||
|
|
||||||
if (argc >= 1) {
|
if (argc >= 1) {
|
||||||
|
|
3
re.c
3
re.c
|
@ -1279,7 +1279,7 @@ rb_reg_search(VALUE re, VALUE str, int pos, int reverse)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
VALUE match;
|
VALUE match;
|
||||||
struct re_registers *regs, regi;
|
struct re_registers regi, *regs = ®i;
|
||||||
char *range = RSTRING_PTR(str);
|
char *range = RSTRING_PTR(str);
|
||||||
regex_t *reg0 = RREGEXP(re)->ptr, *reg;
|
regex_t *reg0 = RREGEXP(re)->ptr, *reg;
|
||||||
int busy = FL_TEST(re, REG_BUSY);
|
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)) {
|
if (NIL_P(match)) {
|
||||||
regs = ®i;
|
|
||||||
MEMZERO(regs, struct re_registers, 1);
|
MEMZERO(regs, struct re_registers, 1);
|
||||||
}
|
}
|
||||||
FL_SET(re, REG_BUSY);
|
FL_SET(re, REG_BUSY);
|
||||||
|
|
|
@ -309,7 +309,7 @@ str_transcode(int argc, VALUE *argv, VALUE *self)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (!final_encoding) { /* loop for multistep transcoding */
|
do { /* loop for multistep transcoding */
|
||||||
/* later, maybe use smaller intermediate strings for very long strings */
|
/* later, maybe use smaller intermediate strings for very long strings */
|
||||||
if (!(my_transcoder = transcode_dispatch(from_e, to_e))) {
|
if (!(my_transcoder = transcode_dispatch(from_e, to_e))) {
|
||||||
rb_raise(rb_eArgError, "transcoding not supported (from %s to %s)", 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;
|
from_e = my_transcoder->to_encoding;
|
||||||
str = dest;
|
str = dest;
|
||||||
}
|
}
|
||||||
}
|
} while (!final_encoding);
|
||||||
/* set encoding */
|
/* set encoding */
|
||||||
if (!to_enc) {
|
if (!to_enc) {
|
||||||
to_encidx = rb_define_dummy_encoding(to_e);
|
to_encidx = rb_define_dummy_encoding(to_e);
|
||||||
|
|
4
util.c
4
util.c
|
@ -3067,6 +3067,7 @@ ret:
|
||||||
return sign ? -dval(rv) : dval(rv);
|
return sign ? -dval(rv) : dval(rv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* unused right now */
|
||||||
static int
|
static int
|
||||||
quorem(Bigint *b, Bigint *S)
|
quorem(Bigint *b, Bigint *S)
|
||||||
{
|
{
|
||||||
|
@ -3177,11 +3178,13 @@ quorem(Bigint *b, Bigint *S)
|
||||||
}
|
}
|
||||||
return q;
|
return q;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef MULTIPLE_THREADS
|
#ifndef MULTIPLE_THREADS
|
||||||
static char *dtoa_result;
|
static char *dtoa_result;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0 /* unused right now */
|
||||||
static char *
|
static char *
|
||||||
rv_alloc(int i)
|
rv_alloc(int i)
|
||||||
{
|
{
|
||||||
|
@ -3212,6 +3215,7 @@ nrv_alloc(const char *s, char **rve, int n)
|
||||||
*rve = t;
|
*rve = t;
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* freedtoa(s) must be used to free values s returned by dtoa
|
/* freedtoa(s) must be used to free values s returned by dtoa
|
||||||
* when MULTIPLE_THREADS is #defined. It should be used in all cases,
|
* when MULTIPLE_THREADS is #defined. It should be used in all cases,
|
||||||
|
|
Loading…
Reference in a new issue