aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-06-29 11:43:48 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2020-06-29 11:43:48 +0900
commit94ab244b43e1aa59dfef9f200b1c253f70975c7e (patch)
tree9b512b8ca9ec28331d16d6619c820e083120f38b /eval.c
parent1020e120e060c00eca456d5a129c344daa472407 (diff)
downloadruby-94ab244b43e1aa59dfef9f200b1c253f70975c7e.tar.gz
rb_class_modify_check: add UNREACHABLE
(I was not aware of this because I use clang, but) it seems gcc cannot detect reachablility of this point. It renders an unused variable warning, which is a false positive. Let us suppress the compiler. https://github.com/ruby/ruby/runs/816997191#step:9:62
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 03a19724cf..52f3cc4e9f 100644
--- a/eval.c
+++ b/eval.c
@@ -489,6 +489,7 @@ rb_class_modify_check(VALUE klass)
break;
default:
Check_Type(klass, T_CLASS);
+ UNREACHABLE;
}
}
rb_frozen_error_raise(klass, "can't modify frozen %s: %"PRIsVALUE, desc, klass);