From e474c189da8314f44659eadcbf9ca3c7d4393bfb Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 8 Apr 2020 15:13:37 +0900 Subject: Suppress -Wswitch warnings --- object.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'object.c') diff --git a/object.c b/object.c index ea2b47c769..dfe3d14e6e 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, -- cgit v1.2.3