mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
1020e120e0
commit
94ab244b43
1 changed files with 1 additions and 0 deletions
1
eval.c
1
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue