summaryrefslogtreecommitdiffstats
path: root/enc/trans
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-17 13:22:40 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-04-17 13:22:40 +0000
commit4d0da9782155bc54b1080a26b56e2776ad40bda6 (patch)
tree47c25e1da76445d1b51c9547c07af2852e978fda /enc/trans
parentf21faba0df422d4e582e0b1db027536ca52a73be (diff)
downloadruby-4d0da9782155bc54b1080a26b56e2776ad40bda6.tar.gz
ruby-4d0da9782155bc54b1080a26b56e2776ad40bda6.tar.xz
ruby-4d0da9782155bc54b1080a26b56e2776ad40bda6.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@16061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/trans')
-rw-r--r--enc/trans/utf_16_32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/enc/trans/utf_16_32.c b/enc/trans/utf_16_32.c
index 045dfcdc0..562e12fbf 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);