summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 347937e383..3f3432fe4a 100644
--- a/string.c
+++ b/string.c
@@ -7035,7 +7035,7 @@ tr_trans(VALUE str, VALUE src, VALUE repl, int sflag)
if (enc != e1) may_modify = 1;
}
if ((offset = t - buf) + tlen > max) {
- size_t old = max + termlen;
+ size_t MAYBE_UNUSED(old) = max + termlen;
max = offset + tlen + (send - s);
SIZED_REALLOC_N(buf, char, max + termlen, old);
t = buf + offset;
@@ -7108,7 +7108,7 @@ tr_trans(VALUE str, VALUE src, VALUE repl, int sflag)
if (enc != e1) may_modify = 1;
}
if ((offset = t - buf) + tlen > max) {
- size_t old = max + termlen;
+ size_t MAYBE_UNUSED(old) = max + termlen;
max = offset + tlen + (long)((send - s) * 1.2);
SIZED_REALLOC_N(buf, char, max + termlen, old);
t = buf + offset;