mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-rational: explicitly add return for error cases too
This commit is contained in:
@@ -979,6 +979,8 @@ mrb_rational_div(mrb_state *mrb, mrb_value x, mrb_value y)
|
||||
|
||||
default:
|
||||
rat_type_error(mrb, y);
|
||||
/* not reached */
|
||||
return mrb_nil_value();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1012,6 +1014,8 @@ rational_pow(mrb_state *mrb, mrb_value x)
|
||||
}
|
||||
#else
|
||||
mrb_raisef(mrb, E_NOTIMP_ERROR, "Rational#** not implemented with MRB_NO_FLOAT");
|
||||
/* not reached */
|
||||
return mrb_nil_value();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user