From e689ee01a0e14c95252fe508e785fec909af0811 Mon Sep 17 00:00:00 2001 From: normal Date: Sun, 1 Oct 2017 01:44:47 +0000 Subject: file.c: remove unnecessary volatile use For apply2files, all callers use the `path' VALUE for generating exceptions, so there is no need to guard it. In realpath_rec, RB_GC_GUARD is already used on link_orig. In rb_check_realpath_internal, RB_GC_GUARD is necessary and preferable (see Appendix E. of doc/extension.rdoc) * file.c (apply2files): remove unnecessary volatile (realpath_rec): ditto (rb_check_realpath_internal): ditto, and add RB_GC_GUARD git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index deb666e096..a73ed57360 100644 --- a/file.c +++ b/file.c @@ -358,7 +358,7 @@ static VALUE apply2files(void (*func)(const char *, VALUE, void *), int argc, VALUE *argv, void *arg) { long i; - volatile VALUE path; + VALUE path; for (i=0; i