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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-04-17 13:22:40 +00:00
Родитель 6f4fb0981d
Коммит 0a2053713b
7 изменённых файлов: 20 добавлений и 14 удалений

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

@ -1,3 +1,18 @@
Thu Apr 17 22:20:52 2008 Yusuke Endoh <mame@tsg.ne.jp>
* 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@tsg.ne.jp> Thu Apr 17 20:12:47 2008 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_rubyoptions.rb (test_search): enable some assertions. * test/ruby/test_rubyoptions.rb (test_search): enable some assertions.

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

@ -3103,7 +3103,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
} }
else { else {
rb_iseq_t *ip; rb_iseq_t *ip;
next_by_throw:
ip = iseq; ip = iseq;
while (ip) { while (ip) {
level = 0x8000; level = 0x8000;
@ -3165,7 +3164,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
else { else {
rb_iseq_t *ip; rb_iseq_t *ip;
unsigned long level; unsigned long level;
redo_by_throw:
level = 0x8000 | 0x4000; level = 0x8000 | 0x4000;
ip = iseq; ip = iseq;
while (ip) { while (ip) {

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

@ -45,12 +45,12 @@ fun_so_to_utf_16be(const unsigned char* s, unsigned char* o)
return 2; return 2;
} }
else if ((s[0]&0xF0)==0xE0) { 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); o[1] = (s[1]<<6) | (s[2]^0x80);
return 2; return 2;
} }
else { 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[0] = 0xD8 | (w>>2);
o[1] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8); o[1] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
o[2] = 0xDC | ((s[2]>>2)&0x03); o[2] = 0xDC | ((s[2]>>2)&0x03);
@ -106,7 +106,7 @@ fun_so_to_utf_16le(const unsigned char* s, unsigned char* o)
return 2; return 2;
} }
else { 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[1] = 0xD8 | (w>>2);
o[0] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8); o[0] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
o[3] = 0xDC | ((s[2]>>2)&0x03); o[3] = 0xDC | ((s[2]>>2)&0x03);

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

@ -138,10 +138,6 @@ int nkf_split_options(const char *arg)
static VALUE static VALUE
rb_nkf_convert(VALUE obj, VALUE opt, VALUE src) rb_nkf_convert(VALUE obj, VALUE opt, VALUE src)
{ {
rb_encoding *to_enc;
const char *to_e;
int to_encidx;
reinit(); reinit();
StringValue(opt); StringValue(opt);
nkf_split_options(RSTRING_PTR(opt)); nkf_split_options(RSTRING_PTR(opt));

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

@ -884,7 +884,6 @@ syck_parser_set_resolver(VALUE self, VALUE resolver)
static VALUE static VALUE
syck_resolver_initialize(VALUE self) syck_resolver_initialize(VALUE self)
{ {
VALUE tags = rb_hash_new();
rb_ivar_set(self, s_tags, rb_hash_new()); rb_ivar_set(self, s_tags, rb_hash_new());
return self; return self;
} }
@ -916,7 +915,6 @@ syck_resolver_use_types_at(VALUE self, VALUE hsh)
VALUE VALUE
syck_resolver_detect_implicit(VALUE self, VALUE val) syck_resolver_detect_implicit(VALUE self, VALUE val)
{ {
char *type_id;
return rb_str_new2( "" ); return rb_str_new2( "" );
} }
@ -1946,7 +1944,6 @@ VALUE
syck_emitter_emit(int argc, VALUE *argv, VALUE self) syck_emitter_emit(int argc, VALUE *argv, VALUE self)
{ {
VALUE oid, proc; VALUE oid, proc;
char *anchor_name;
SyckEmitter *emitter; SyckEmitter *emitter;
struct emitter_xtra *bonus; struct emitter_xtra *bonus;
SYMID symple; SYMID symple;

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

@ -2394,8 +2394,6 @@ static VALUE
rb_io_getc(VALUE io) rb_io_getc(VALUE io)
{ {
rb_io_t *fptr; rb_io_t *fptr;
int r, n;
VALUE str;
rb_encoding *enc; rb_encoding *enc;
GetOpenFile(io, fptr); GetOpenFile(io, fptr);

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

@ -759,6 +759,8 @@ x = __ENCODING__
end end
def test_void_expr_stmts_value def test_void_expr_stmts_value
# This test checks if void contexts are warned correctly.
# Thus, warnings MUST NOT be suppressed.
$VERBOSE = true $VERBOSE = true
x = 1 x = 1
assert_nil eval("x; nil") assert_nil eval("x; nil")