summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex/src/complex.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-08-29 07:38:45 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 18:20:07 +0900
commitdd1ce5d53efa9a00cd9bdc7a7771bc6489da4469 (patch)
tree1354054dcdf4f621c5adcbb8b5208fb079774957 /mrbgems/mruby-complex/src/complex.c
parent7eaaee5405f71c598893e9a022c755f61f11e9ec (diff)
downloadmruby-dd1ce5d53efa9a00cd9bdc7a7771bc6489da4469.tar.gz
mruby-dd1ce5d53efa9a00cd9bdc7a7771bc6489da4469.zip
Silence warnings from implicit integer conversions.
Caused from combination of `mrb_int`, `int` and `size_t`..
Diffstat (limited to 'mrbgems/mruby-complex/src/complex.c')
-rw-r--r--mrbgems/mruby-complex/src/complex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-complex/src/complex.c b/mrbgems/mruby-complex/src/complex.c
index 85735b704..6b7486ab0 100644
--- a/mrbgems/mruby-complex/src/complex.c
+++ b/mrbgems/mruby-complex/src/complex.c
@@ -122,7 +122,7 @@ complex_to_i(mrb_state *mrb, mrb_value self)
if (p->imaginary != 0) {
mrb_raisef(mrb, E_RANGE_ERROR, "can't convert %v into Float", self);
}
- return mrb_int_value(mrb, p->real);
+ return mrb_int_value(mrb, (mrb_int)p->real);
}
static mrb_value