summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-25 04:58:02 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-05-25 04:58:02 +0000
commit45c61f40b23b14e97428206e1b813eb813526e6f (patch)
treebbffa6043ed1e8b6a501d23c3b4874ae3390ddd8 /string.c
parent369fe1e8394b494c78d56aedfe6b0b809d7d1c10 (diff)
remove unused variables
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/string.c b/string.c
index f0c05de19b..dd534321c8 100644
--- a/string.c
+++ b/string.c
@@ -287,8 +287,6 @@ str_substr(str, start, len)
VALUE str;
int start, len;
{
- struct RString *str2;
-
if (start < 0) {
start = RSTRING(str)->len + start;
}
@@ -976,7 +974,7 @@ str_sub_iter_s(str, pat, once)
int once;
{
VALUE val, result;
- int beg, offset, n, null;
+ int beg, offset, n;
struct re_registers *regs;
if (!iterator_p()) {
@@ -1698,10 +1696,10 @@ str_swapcase(str)
typedef unsigned char *USTR;
-static struct tr {
+struct tr {
int gen, now, max;
char *p, *pend;
-} trsrc, trrepl;
+};
static int
trnext(t)
@@ -1813,7 +1811,7 @@ tr_trans(str, src, repl, sflag)
*t++ = c;
}
}
- if (RSTRING(str)->len = (t - RSTRING(str)->ptr)) {
+ if (RSTRING(str)->len > (t - RSTRING(str)->ptr)) {
RSTRING(str)->len = (t - RSTRING(str)->ptr);
modify = 1;
*t = '\0';