Skip to content
Permalink
Browse files
add explicit casts
  • Loading branch information
matz committed Jan 2, 2017
1 parent f388b6d commit bc1259de3b3e1b2ba690ec5a122e95fb9a7c0d5a
Showing 2 changed files with 2 additions and 2 deletions.
@@ -156,7 +156,7 @@ mrb_range_size(mrb_state *mrb, mrb_value range)
}
if (isinf(n+1))
return mrb_float_value(mrb, INFINITY);
return mrb_fixnum_value(n+1);
return mrb_fixnum_value((mrb_int)n+1);
}
return mrb_nil_value();
}
@@ -194,7 +194,7 @@ time_update_datetime(mrb_state *mrb, struct mrb_time *self)
aid = localtime_r(&self->sec, &self->datetime);
}
if (!aid) {
mrb_raisef(mrb, E_ARGUMENT_ERROR, "%S out of Time range", mrb_float_value(mrb, self->sec));
mrb_raisef(mrb, E_ARGUMENT_ERROR, "%S out of Time range", mrb_float_value(mrb, (mrb_float)self->sec));
/* not reached */
return NULL;
}

0 comments on commit bc1259d

Please sign in to comment.