summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-04-24 11:38:56 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-04-24 11:38:56 +0900
commit4b4622f711e598d2329f4a14977914f45dd3ae53 (patch)
tree072e41f1a9df1c7519cc6be8488cc190a4631bac
parent237f3339bf847eb9633655aa7480f15945d73f46 (diff)
downloadmruby-4b4622f711e598d2329f4a14977914f45dd3ae53.tar.gz
mruby-4b4622f711e598d2329f4a14977914f45dd3ae53.zip
time.c: `fixable_time_t_p` is not used with `MRB_NO_FLOAT`; #5421
-rw-r--r--mrbgems/mruby-time/src/time.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c
index 44bea5ffa..2a5e9dd6b 100644
--- a/mrbgems/mruby-time/src/time.c
+++ b/mrbgems/mruby-time/src/time.c
@@ -226,6 +226,7 @@ typedef mrb_int mrb_sec;
(sizeof(time_t) <= 4 ? INT32_MAX : INT64_MAX) \
)
+#ifndef MRB_NO_FLOAT
/* return true if time_t is fit in mrb_int */
static mrb_bool
fixable_time_t_p(time_t v)
@@ -236,6 +237,7 @@ fixable_time_t_p(time_t v)
if (MRB_INT_MIN > (mrb_int)v) return FALSE;
return TRUE;
}
+#endif
static time_t
mrb_to_time_t(mrb_state *mrb, mrb_value obj, time_t *usec)