diff options
author | James McCoy <jamessan@jamessan.com> | 2017-05-06 22:45:26 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-06-04 22:12:15 -0400 |
commit | b3129b37917f54eb056033a41d1acbb920a5b93b (patch) | |
tree | e9fef69911fcfdfab90b21be3e13fd21743f5e8c /src/nvim/eval/executor.c | |
parent | eb5e4a247666c0ba26b21e214249789ea7c52e85 (diff) | |
download | rneovim-b3129b37917f54eb056033a41d1acbb920a5b93b.tar.gz rneovim-b3129b37917f54eb056033a41d1acbb920a5b93b.tar.bz2 rneovim-b3129b37917f54eb056033a41d1acbb920a5b93b.zip |
eexe_mod_op: Explicitly cast varnumber_T to float_T for -Wconversion
Diffstat (limited to 'src/nvim/eval/executor.c')
-rw-r--r-- | src/nvim/eval/executor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/eval/executor.c b/src/nvim/eval/executor.c index 118228a40c..99298cbbcf 100644 --- a/src/nvim/eval/executor.c +++ b/src/nvim/eval/executor.c @@ -55,7 +55,7 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, // nr += nr or nr -= nr varnumber_T n = tv_get_number(tv1); if (tv2->v_type == VAR_FLOAT) { - float_T f = n; + float_T f = (float_T)n; if (*op == '+') { f += tv2->vval.v_float; @@ -99,7 +99,7 @@ int eexe_mod_op(typval_T *const tv1, const typval_T *const tv2, } const float_T f = (tv2->v_type == VAR_FLOAT ? tv2->vval.v_float - : tv_get_number(tv2)); + : (float_T)tv_get_number(tv2)); if (*op == '+') { tv1->vval.v_float += f; } else { |