Add explicit casting in `file.c` to silence warnings.

parent 724c90f3
...@@ -402,11 +402,11 @@ mrb_file_size(mrb_state *mrb, mrb_value self) ...@@ -402,11 +402,11 @@ mrb_file_size(mrb_state *mrb, mrb_value self)
#ifdef MRB_WITHOUT_FLOAT #ifdef MRB_WITHOUT_FLOAT
mrb_raise(mrb, E_RUNTIME_ERROR, "File#size too large for MRB_WITHOUT_FLOAT"); mrb_raise(mrb, E_RUNTIME_ERROR, "File#size too large for MRB_WITHOUT_FLOAT");
#else #else
return mrb_float_value(mrb, st.st_size); return mrb_float_value(mrb, (mrb_float)st.st_size);
#endif #endif
} }
return mrb_fixnum_value(st.st_size); return mrb_fixnum_value((mrb_int)st.st_size);
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment