summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-06-14 13:49:10 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-06-14 14:09:43 +0900
commitf0f9e77b65990001bd2acb42e1c6b673f6324425 (patch)
tree44e76aaa38ad3e2bb59fd232b9fee3e146878fff /load.c
parent2792acc8f29c6ee1d04b57b7b70d43519a0ceda8 (diff)
downloadruby-f0f9e77b65990001bd2acb42e1c6b673f6324425.tar.gz
Suppress gcc11 clobbered warning
Diffstat (limited to 'load.c')
-rw-r--r--load.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/load.c b/load.c
index d6616fc5cd..b4c73e159d 100644
--- a/load.c
+++ b/load.c
@@ -1047,10 +1047,12 @@ require_internal(rb_execution_context_t *ec, VALUE fname, int exception)
if ((state = EC_EXEC_TAG()) == TAG_NONE) {
long handle;
int found;
+ volatile VALUE found_path;
RUBY_DTRACE_HOOK(FIND_REQUIRE_ENTRY, RSTRING_PTR(fname));
- found = search_required(path, &path, rb_feature_p);
+ found = search_required(path, &found_path, rb_feature_p);
RUBY_DTRACE_HOOK(FIND_REQUIRE_RETURN, RSTRING_PTR(fname));
+ path = found_path;
if (found) {
if (!path || !(ftptr = load_lock(RSTRING_PTR(path)))) {