From 34dddc58e1cfc8091907406ce3df943cdf03bd4d Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Tue, 29 May 2012 16:15:43 +0900 Subject: Use default case in switch statement. --- src/string.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index 28513c15c..695b0d01c 100644 --- a/src/string.c +++ b/src/string.c @@ -4400,9 +4400,17 @@ mrb_str_conv_enc_opts(mrb_state *mrb, mrb_value str, mrb_encoding *from, mrb_enc mrb_enc_associate(mrb, newstr, to); return newstr; - default: + case econv_invalid_byte_sequence: + case econv_undefined_conversion: + case econv_source_buffer_empty: + case econv_after_output: + case econv_incomplete_input: /* some error, return original */ return str; + + default: + mrb_bug("Internal Error: Invalid return value mrb_econv_convert."); + return str; } } -- cgit v1.2.3