aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2020-08-14 08:51:14 +0900
committerYusuke Endoh <mame@ruby-lang.org>2020-08-14 08:51:14 +0900
commit4318aba9c94ebff53e4168886e1a35a24013924f (patch)
tree92bf57725521c9803c9d43f57da34efe88d7720c /re.c
parent22fd617aa5a8dd9c8426a546e0cb8a64b45c230b (diff)
downloadruby-4318aba9c94ebff53e4168886e1a35a24013924f.tar.gz
re.c: prevent "warning: variable 'n' set but not used"
by adding MAYBE_UNUSED.
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index d7766905bb..63cfc026de 100644
--- a/re.c
+++ b/re.c
@@ -3519,7 +3519,7 @@ rb_reg_quote(VALUE str)
t = RSTRING_PTR(tmp);
/* copy upto metacharacter */
const char *p;
- long n;
+ long MAYBE_UNUSED(n);
RSTRING_GETMEM(str, p, n);
memcpy(t, p, s - p);
t += s - p;