From 94ab244b43e1aa59dfef9f200b1c253f70975c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=9C=E9=83=A8=E6=98=8C=E5=B9=B3?= Date: Mon, 29 Jun 2020 11:43:48 +0900 Subject: 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 --- eval.c | 1 + 1 file changed, 1 insertion(+) (limited to 'eval.c') 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); -- cgit v1.2.3