ruby-changes:62571
From: Yusuke <ko1@a...>
Date: Fri, 14 Aug 2020 08:52:42 +0900 (JST)
Subject: [ruby-changes:62571] 4318aba9c9 (master): re.c: prevent "warning: variable 'n' set but not used"
https://git.ruby-lang.org/ruby.git/commit/?id=4318aba9c9 From 4318aba9c94ebff53e4168886e1a35a24013924f Mon Sep 17 00:00:00 2001 From: Yusuke Endoh <mame@r...> Date: Fri, 14 Aug 2020 08:51:14 +0900 Subject: re.c: prevent "warning: variable 'n' set but not used" by adding MAYBE_UNUSED. diff --git a/re.c b/re.c index d776690..63cfc02 100644 --- a/re.c +++ b/re.c @@ -3519,7 +3519,7 @@ rb_reg_quote(VALUE str) https://github.com/ruby/ruby/blob/trunk/re.c#L3519 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; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/