summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--compile.c2
-rw-r--r--enc/trans/utf_16_32.c6
-rw-r--r--ext/nkf/nkf.c4
-rw-r--r--ext/syck/rubyext.c3
-rw-r--r--io.c2
-rw-r--r--test/ruby/test_parse.rb2
7 files changed, 20 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index 35e224ed25..179e79fa64 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
* test/ruby/test_rubyoptions.rb (test_search): enable some assertions.
diff --git a/compile.c b/compile.c
index 0aebc8c056..03e17ad05d 100644
--- a/compile.c
+++ b/compile.c
@@ -3103,7 +3103,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
}
else {
rb_iseq_t *ip;
- next_by_throw:
ip = iseq;
while (ip) {
level = 0x8000;
@@ -3165,7 +3164,6 @@ iseq_compile_each(rb_iseq_t *iseq, LINK_ANCHOR *ret, NODE * node, int poped)
else {
rb_iseq_t *ip;
unsigned long level;
- redo_by_throw:
level = 0x8000 | 0x4000;
ip = iseq;
while (ip) {
diff --git a/enc/trans/utf_16_32.c b/enc/trans/utf_16_32.c
index 045dfcdc0a..562e12fbfe 100644
--- a/enc/trans/utf_16_32.c
+++ b/enc/trans/utf_16_32.c
@@ -45,12 +45,12 @@ fun_so_to_utf_16be(const unsigned char* s, unsigned char* o)
return 2;
}
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);
return 2;
}
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[1] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
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;
}
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[0] = (w<<6) | ((s[1]&0x0F)<<2) | ((s[2]>>4)-8);
o[3] = 0xDC | ((s[2]>>2)&0x03);
diff --git a/ext/nkf/nkf.c b/ext/nkf/nkf.c
index f2647f3d9d..ba8ffc978f 100644
--- a/ext/nkf/nkf.c
+++ b/ext/nkf/nkf.c
@@ -138,10 +138,6 @@ int nkf_split_options(const char *arg)
static VALUE
rb_nkf_convert(VALUE obj, VALUE opt, VALUE src)
{
- rb_encoding *to_enc;
- const char *to_e;
- int to_encidx;
-
reinit();
StringValue(opt);
nkf_split_options(RSTRING_PTR(opt));
diff --git a/ext/syck/rubyext.c b/ext/syck/rubyext.c
index 1c44f7c055..b1b8a5c12e 100644
--- a/ext/syck/rubyext.c
+++ b/ext/syck/rubyext.c
@@ -884,7 +884,6 @@ syck_parser_set_resolver(VALUE self, VALUE resolver)
static VALUE
syck_resolver_initialize(VALUE self)
{
- VALUE tags = rb_hash_new();
rb_ivar_set(self, s_tags, rb_hash_new());
return self;
}
@@ -916,7 +915,6 @@ syck_resolver_use_types_at(VALUE self, VALUE hsh)
VALUE
syck_resolver_detect_implicit(VALUE self, VALUE val)
{
- char *type_id;
return rb_str_new2( "" );
}
@@ -1946,7 +1944,6 @@ VALUE
syck_emitter_emit(int argc, VALUE *argv, VALUE self)
{
VALUE oid, proc;
- char *anchor_name;
SyckEmitter *emitter;
struct emitter_xtra *bonus;
SYMID symple;
diff --git a/io.c b/io.c
index 9524894ea3..f3a7c597dc 100644
--- a/io.c
+++ b/io.c
@@ -2394,8 +2394,6 @@ static VALUE
rb_io_getc(VALUE io)
{
rb_io_t *fptr;
- int r, n;
- VALUE str;
rb_encoding *enc;
GetOpenFile(io, fptr);
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb
index 125af1fa37..bb7d662811 100644
--- a/test/ruby/test_parse.rb
+++ b/test/ruby/test_parse.rb
@@ -759,6 +759,8 @@ x = __ENCODING__
end
def test_void_expr_stmts_value
+ # This test checks if void contexts are warned correctly.
+ # Thus, warnings MUST NOT be suppressed.
$VERBOSE = true
x = 1
assert_nil eval("x; nil")