1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

re.c: prevent "warning: variable 'n' set but not used"

by adding MAYBE_UNUSED.
This commit is contained in:
Yusuke Endoh 2020-08-14 08:51:14 +09:00
parent 22fd617aa5
commit 4318aba9c9

2
re.c
View file

@ -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;