summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--class.c2
-rw-r--r--compile.c2
-rw-r--r--eval.c2
-rw-r--r--ext/objspace/objspace_dump.c4
-rw-r--r--gc.c12
-rw-r--r--iseq.c2
-rw-r--r--numeric.c2
-rw-r--r--object.c6
-rw-r--r--proc.c3
-rw-r--r--process.c2
-rw-r--r--range.c2
-rw-r--r--variable.c1
-rw-r--r--vm_method.c2
13 files changed, 42 insertions, 0 deletions
diff --git a/class.c b/class.c
index 597f6bd..cf25ad2 100644
--- a/class.c
+++ b/class.c
@@ -1712,6 +1712,8 @@ singleton_class_of(VALUE obj)
case T_STRING:
if (FL_TEST_RAW(obj, RSTRING_FSTR)) goto no_singleton;
break;
+ default:
+ break;
}
}
diff --git a/compile.c b/compile.c
index a894741..bd249a5 100644
--- a/compile.c
+++ b/compile.c
@@ -8677,6 +8677,8 @@ opobj_inspect(VALUE obj)
case T_ARRAY:
obj = rb_ary_dup(obj);
break;
+ default:
+ break;
}
}
return rb_inspect(obj);
diff --git a/eval.c b/eval.c
index 8b1897c..0102171 100644
--- a/eval.c
+++ b/eval.c
@@ -468,6 +468,8 @@ rb_class_modify_check(VALUE klass)
case T_CLASS:
desc = "Class";
break;
+ default:
+ break;
}
}
}
diff --git a/ext/objspace/objspace_dump.c b/ext/objspace/objspace_dump.c
index d753b48..7dd0731 100644
--- a/ext/objspace/objspace_dump.c
+++ b/ext/objspace/objspace_dump.c
@@ -135,6 +135,7 @@ obj_type(VALUE obj)
CASE_TYPE(NODE);
CASE_TYPE(ZOMBIE);
#undef CASE_TYPE
+ default: break;
}
return "UNKNOWN";
}
@@ -315,6 +316,9 @@ dump_object(VALUE obj, struct dump_config *dc)
case T_ZOMBIE:
dump_append(dc, "}\n");
return;
+
+ default:
+ break;
}
rb_objspace_reachable_objects_from(obj, reachable_object_i, dc);
diff --git a/gc.c b/gc.c
index eb49f04..a1b8dcf 100644
--- a/gc.c
+++ b/gc.c
@@ -2594,6 +2594,8 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
case T_FALSE:
rb_bug("obj_free() called for broken object");
break;
+ default:
+ break;
}
if (FL_TEST(obj, FL_EXIVAR)) {
@@ -3564,6 +3566,8 @@ rb_objspace_call_finalizer(rb_objspace_t *objspace)
make_io_zombie(objspace, vp);
}
break;
+ default:
+ break;
}
if (poisoned) {
GC_ASSERT(BUILTIN_TYPE(vp) == T_NONE);
@@ -3634,6 +3638,8 @@ is_live_object(rb_objspace_t *objspace, VALUE ptr)
case T_NONE:
case T_ZOMBIE:
return FALSE;
+ default:
+ break;
}
if (!is_garbage_object(objspace, ptr)) {
@@ -4588,6 +4594,9 @@ push_mark_stack(mark_stack_t *stack, VALUE data)
case T_NODE:
UNEXPECTED_NODE(push_mark_stack);
break;
+
+ default:
+ break;
}
if (stack->index == stack->limit) {
@@ -5397,6 +5406,9 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj)
case T_IMEMO:
gc_mark_imemo(objspace, obj);
return;
+
+ default:
+ break;
}
gc_mark(objspace, any->as.basic.klass);
diff --git a/iseq.c b/iseq.c
index 7c888f5..0488735 100644
--- a/iseq.c
+++ b/iseq.c
@@ -68,6 +68,8 @@ obj_resurrect(VALUE obj)
case T_HASH:
obj = rb_hash_resurrect(obj);
break;
+ default:
+ break;
}
}
return obj;
diff --git a/numeric.c b/numeric.c
index 90db8aa..801370a 100644
--- a/numeric.c
+++ b/numeric.c
@@ -4147,6 +4147,8 @@ rb_num_pow(VALUE x, VALUE y)
return rb_complex_pow(x, y);
case T_RATIONAL:
return rb_rational_pow(x, y);
+ default:
+ break;
}
return Qnil;
}
diff --git a/object.c b/object.c
index ea2b47c..dfe3d14 100644
--- a/object.c
+++ b/object.c
@@ -3917,6 +3917,8 @@ rb_num_to_dbl(VALUE val)
if (basic_to_f_p(rb_cRational))
return rat2dbl_without_to_f(val);
break;
+ default:
+ break;
}
}
val = numeric_to_float(val);
@@ -3954,6 +3956,8 @@ rb_num2dbl(VALUE val)
return rat2dbl_without_to_f(val);
case T_STRING:
rb_raise(rb_eTypeError, "no implicit conversion to float from string");
+ default:
+ break;
}
}
val = rb_convert_type_with_id(val, T_FLOAT, "Float", id_to_f);
@@ -4132,6 +4136,8 @@ rb_obj_dig(int argc, VALUE *argv, VALUE obj, VALUE notfound)
continue;
}
break;
+ default:
+ break;
}
}
return rb_check_funcall_with_hook_kw(obj, id_dig, argc, argv,
diff --git a/proc.c b/proc.c
index 9164c27..50ebdbd 100644
--- a/proc.c
+++ b/proc.c
@@ -1827,6 +1827,9 @@ rb_method_name_error(VALUE klass, VALUE str)
case T_CLASS:
c = obj;
s = MSG("");
+ break;
+ default:
+ break;
}
goto normal_class;
}
diff --git a/process.c b/process.c
index b45c79c..3d3fef1 100644
--- a/process.c
+++ b/process.c
@@ -2390,6 +2390,8 @@ check_hash(VALUE obj)
case T_STRING:
case T_ARRAY:
return Qnil;
+ default:
+ break;
}
return rb_check_hash_type(obj);
}
diff --git a/range.c b/range.c
index a77d324..2444f05 100644
--- a/range.c
+++ b/range.c
@@ -318,6 +318,8 @@ linear_object_p(VALUE obj)
case T_FLOAT:
case T_BIGNUM:
return TRUE;
+ default:
+ break;
}
if (rb_obj_is_kind_of(obj, rb_cNumeric)) return TRUE;
if (rb_obj_is_kind_of(obj, rb_cTime)) return TRUE;
diff --git a/variable.c b/variable.c
index 94bac4a..9ff0326 100644
--- a/variable.c
+++ b/variable.c
@@ -72,6 +72,7 @@ rb_namespace_p(VALUE obj)
if (RB_SPECIAL_CONST_P(obj)) return false;
switch (RB_BUILTIN_TYPE(obj)) {
case T_MODULE: case T_CLASS: return true;
+ default: break;
}
return false;
}
diff --git a/vm_method.c b/vm_method.c
index de58f7d..afda598 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -524,6 +524,8 @@ filter_defined_class(VALUE klass)
return 0;
case T_ICLASS:
break;
+ default:
+ break;
}
rb_bug("filter_defined_class: %s", rb_obj_info(klass));
}