summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-04 01:23:58 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-04 01:23:58 +0000
commitb259e449d14e47e225960ec0fce12a5b2c1bec6d (patch)
treebfd3f3e3fcfcc3bb1769177ece8d2f229006cb61 /re.c
parent3a633b812e3676d4a1c8f20426d0354be530e056 (diff)
* random.c (rand_init): remove useless assignment.
* re.c (update_char_offset): remove unused variable. * re.c (read_escaped_byte): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/re.c b/re.c
index 298d1d9..82507cf 100644
--- a/re.c
+++ b/re.c
@@ -859,7 +859,7 @@ update_char_offset(VALUE match)
struct re_registers *regs;
int i, num_regs, num_pos;
long c;
- char *s, *p, *q, *e;
+ char *s, *p, *q;
rb_encoding *enc;
pair_t *pairs;
@@ -895,7 +895,6 @@ update_char_offset(VALUE match)
qsort(pairs, num_pos, sizeof(pair_t), pair_byte_cmp);
s = p = RSTRING_PTR(RMATCH(match)->str);
- e = s + RSTRING_LEN(RMATCH(match)->str);
c = 0;
for (i = 0; i < num_pos; i++) {
q = s + pairs[i].byte_pos;
@@ -1899,9 +1898,7 @@ read_escaped_byte(const char **pp, const char *end, onig_errmsg_buffer err)
int code;
int meta_prefix = 0, ctrl_prefix = 0;
size_t len;
- int retbyte;
- retbyte = -1;
if (p == end || *p++ != '\\') {
errcpy(err, "too short escaped multibyte character");
return -1;